setup.py
This file
Path
setup.py
79 lines · 2.4 KiB · Python
Last changed by
Auto-detect CA Cert path instead of requiring users to hack setup.pyMichael Schurterbefore adoption62a23bf
History of this fileTake it
The walk stopped after 200 commits: lines older than 590ce29 point at it.
Implemented #439. Added supporting test.Shrikant Sharatbefore adoption590ce29
lines 1–2why, one step back1#!/usr/bin/env python2Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
lines 3–6why, one step back3"""4distutils/setuptools install script. See inline comments for packaging documentation.5"""6Merge pull request #572 from slingamn/chardet_2Kenneth Reitzbefore adoptiona3e5563
line 7why, one step back7import osImplemented #439. Added supporting test.Shrikant Sharatbefore adoption590ce29
line 8why, one step back8import sysChange setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 9why, one step back9Implemented #439. Added supporting test.Shrikant Sharatbefore adoption590ce29
line 10why, one step back10import requestsChange setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 11why, one step back11from requests.compat import is_py3Implemented #439. Added supporting test.Shrikant Sharatbefore adoption590ce29
lines 12–14why, one step back1213try:14 from setuptools import setupMerge pull request #579 from slingamn/pyflakes.releaseKenneth Reitzbefore adoption3d373e2
lines 15–16why, one step back15 # hush pyflakes16 setupImplemented #439. Added supporting test.Shrikant Sharatbefore adoption590ce29
lines 17–32why, one step back17except ImportError:18 from distutils.core import setup1920if sys.argv[-1] == 'publish':21 os.system('python setup.py sdist upload')22 sys.exit()2324packages = [25 'requests',26 'requests.packages',27 'requests.packages.urllib3',28 'requests.packages.urllib3.packages',29 'requests.packages.urllib3.packages.ssl_match_hostname',30 'requests.packages.urllib3.packages.mimetools_choose_boundary',31]32Auto-detect CA Cert path instead of requiring users to hack setup.pyMichael Schurterbefore adoption62a23bf
lines 33–40why, one step back33requires = []3435# certifi is a Python package containing a CA certificate bundle for SSL36# verification. On certain supported platforms (e.g., Red Hat / Debian /37# FreeBSD), Requests can use the system CA bundle instead; see `requests.utils`38# for details.39if not requests.utils.get_os_ca_bundle_path():40 requires.append('certifi>=0.0.7')Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
lines 41–44why, one step back4142# chardet is used to optimally guess the encodings of pages that don't declare one.43# At this time, chardet is not a required dependency. However, it's sufficiently44# important that pip/setuptools should install it when it's unavailable.Implemented #439. Added supporting test.Shrikant Sharatbefore adoption590ce29
line 45why, one step back45if is_py3:Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 46why, one step back46 chardet_package = 'chardet2'Implemented #439. Added supporting test.Shrikant Sharatbefore adoption590ce29
line 47why, one step back47else:Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 48why, one step back48 chardet_package = 'chardet>=1.0.0'oauthlibKenneth Reitzbefore adoption9324c2a
lines 49–50why, one step back49 requires.append('oauthlib>=0.1.0,<0.2.0')50Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 51why, one step back51requires.append(chardet_package)Implemented #439. Added supporting test.Shrikant Sharatbefore adoption590ce29
lines 52–64why, one step back5253setup(54 name='requests',55 version=requests.__version__,56 description='Python HTTP for Humans.',57 long_description=open('README.rst').read() + '\n\n' +58 open('HISTORY.rst').read(),59 author='Kenneth Reitz',60 author_email='me@kennethreitz.com',61 url='http://python-requests.org',62 packages=packages,63 package_data={'': ['LICENSE', 'NOTICE']},64 include_package_data=True,Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 65why, one step back65 install_requires=requires,blahKenneth Reitzbefore adoptionbcbc1be
line 66why, one step back66 license=open("LICENSE").read(),Implemented #439. Added supporting test.Shrikant Sharatbefore adoption590ce29
lines 67–79why, one step back67 classifiers=(68 'Development Status :: 5 - Production/Stable',69 'Intended Audience :: Developers',70 'Natural Language :: English',71 'License :: OSI Approved :: ISC License (ISCL)',72 'Programming Language :: Python',73 'Programming Language :: Python :: 2.6',74 'Programming Language :: Python :: 2.7',75 'Programming Language :: Python :: 3',76 'Programming Language :: Python :: 3.0',77 'Programming Language :: Python :: 3.1',78 ),79)