setup.py
This file
Path
setup.py
81 lines · 2.5 KiB · Python
Last changed by
Merge pull request #572 from slingamn/chardet_2Kenneth Reitzbefore adoptiona3e5563
History of this fileTake it
The walk stopped after 200 commits: lines older than 50298bb point at it.
80kKenneth Reitzbefore adoption50298bb
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 os80kKenneth Reitzbefore adoption50298bb
line 8why, one step back8import sysChange setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 9why, one step back980kKenneth Reitzbefore adoption50298bb
line 10why, one step back10import requestsChange setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 11why, one step back11from requests.compat import is_py380kKenneth Reitzbefore adoption50298bb
lines 12–21why, one step back1213try:14 from setuptools import setup15except ImportError:16 from distutils.core import setup1718if sys.argv[-1] == 'publish':19 os.system('python setup.py sdist upload')20 sys.exit()21only do oreos for 2Kenneth Reitzbefore adoptione695941
lines 22–29why, one step back22packages = [23 'requests',24 'requests.packages',25 'requests.packages.urllib3',26 'requests.packages.urllib3.packages',27 'requests.packages.urllib3.packages.ssl_match_hostname',28 'requests.packages.urllib3.packages.mimetools_choose_boundary',29]80kKenneth Reitzbefore adoption50298bb
line 30why, one step back30Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
lines 31–39why, one step back31# certifi is a Python package containing a CA certificate bundle for SSL verification.32# On certain supported platforms (e.g., Red Hat / Debian / FreeBSD), Requests can33# use the system CA bundle instead; see `requests.utils` for details.34# If your platform is supported, set `requires` to [] instead:35requires = ['certifi>=0.0.7']3637# chardet is used to optimally guess the encodings of pages that don't declare one.38# At this time, chardet is not a required dependency. However, it's sufficiently39# important that pip/setuptools should install it when it's unavailable.80kKenneth Reitzbefore adoption50298bb
line 40why, one step back40if is_py3:Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 41why, one step back41 chardet_package = 'chardet2'80kKenneth Reitzbefore adoption50298bb
line 42why, one step back42else:Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 43why, one step back43 chardet_package = 'chardet>=1.0.0'oauthlibKenneth Reitzbefore adoption9324c2a
lines 44–45why, one step back44 requires.append('oauthlib>=0.1.0,<0.2.0')45Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
line 46why, one step back46requires.append(chardet_package)80kKenneth Reitzbefore adoption50298bb
line 47why, one step back47Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
lines 48–53why, one step back48# The async API in requests.async requires the gevent package.49# This is also not a required dependency.50extras_require = {51 'async': ['gevent'],52}5380kKenneth Reitzbefore adoption50298bb
lines 54–62why, one step back54setup(55 name='requests',56 version=requests.__version__,57 description='Python HTTP for Humans.',58 long_description=open('README.rst').read() + '\n\n' +59 open('HISTORY.rst').read(),60 author='Kenneth Reitz',61 author_email='me@kennethreitz.com',62 url='http://python-requests.org',only do oreos for 2Kenneth Reitzbefore adoptione695941
line 63why, one step back63 packages=packages,80kKenneth Reitzbefore adoption50298bb
lines 64–65why, one step back64 package_data={'': ['LICENSE', 'NOTICE']},65 include_package_data=True,Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f
lines 66–67why, one step back66 install_requires=requires,67 extras_require=extras_require,blahKenneth Reitzbefore adoptionbcbc1be
line 68why, one step back68 license=open("LICENSE").read(),80kKenneth Reitzbefore adoption50298bb
lines 69–81why, one step back69 classifiers=(70 'Development Status :: 5 - Production/Stable',71 'Intended Audience :: Developers',72 'Natural Language :: English',73 'License :: OSI Approved :: ISC License (ISCL)',74 'Programming Language :: Python',75 'Programming Language :: Python :: 2.6',76 'Programming Language :: Python :: 2.7',77 'Programming Language :: Python :: 3',78 'Programming Language :: Python :: 3.0',79 'Programming Language :: Python :: 3.1',80 ),81)