tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

setup.py (2220B)


      1 #!/usr/bin/env python
      2 # -*- coding: utf-8 -*-
      3 from __future__ import with_statement
      4 import re
      5 import os
      6 import sys
      7 
      8 # While I generally consider it an antipattern to try and support both
      9 # setuptools and distutils with a single setup.py, in this specific instance
     10 # where certifi is a dependency of setuptools, it can create a circular
     11 # dependency when projects attempt to unbundle stuff from setuptools and pip.
     12 # Though we don't really support that, it makes things easier if we do this and
     13 # should hopefully cause less issues for end users.
     14 try:
     15    from setuptools import setup
     16 except ImportError:
     17    from distutils.core import setup
     18 
     19 
     20 version_regex = r'__version__ = ["\']([^"\']*)["\']'
     21 with open('certifi/__init__.py', 'r') as f:
     22    text = f.read()
     23    match = re.search(version_regex, text)
     24 
     25    if match:
     26        VERSION = match.group(1)
     27    else:
     28        raise RuntimeError("No version number found!")
     29 
     30 if sys.argv[-1] == 'publish':
     31    os.system('python setup.py sdist bdist_wheel upload')
     32    sys.exit()
     33 
     34 required = []
     35 setup(
     36    name='certifi',
     37    version=VERSION,
     38    description='Python package for providing Mozilla\'s CA Bundle.',
     39    long_description=open('README.rst').read(),
     40    author='Kenneth Reitz',
     41    author_email='me@kennethreitz.com',
     42    url='http://certifi.io/',
     43    packages=[
     44        'certifi',
     45    ],
     46    package_dir={'certifi': 'certifi'},
     47    package_data={'certifi': ['*.pem']},
     48    # data_files=[('certifi', ['certifi/cacert.pem'])],
     49    include_package_data=True,
     50    zip_safe=False,
     51    license='MPL-2.0',
     52    classifiers=(
     53        'Development Status :: 5 - Production/Stable',
     54        'Intended Audience :: Developers',
     55        'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
     56        'Natural Language :: English',
     57        'Programming Language :: Python',
     58        'Programming Language :: Python :: 2',
     59        'Programming Language :: Python :: 2.6',
     60        'Programming Language :: Python :: 2.7',
     61        'Programming Language :: Python :: 3',
     62        'Programming Language :: Python :: 3.3',
     63        'Programming Language :: Python :: 3.4',
     64        'Programming Language :: Python :: 3.5',
     65        'Programming Language :: Python :: 3.6',
     66    ),
     67 )