setup.py
This file
Path
setup.py
103 lines · 3.3 KiB · Python
Last changed by
Merge pull request #4631 from pradyunsg/patch-1Ian Stapleton Cordascobefore adoption5f09f0c
History of this fileTake it
The walk stopped after 200 commits: lines older than c77911c point at it.
Merge pull request #4094 from kennethreitz/flake8Kenneth Reitzbefore adoptionc77911c
line 1why, one step back1#!/usr/bin/env pythonUpdate setup.pyKenneth Reitzbefore adoption96b9a3f
line 2why, one step back2# Learn more: https://github.com/kennethreitz/setup.pyMerge pull request #4094 from kennethreitz/flake8Kenneth Reitzbefore adoptionc77911c
lines 3–19why, one step back34import os5import re6import sys78from codecs import open910from setuptools import setup11from setuptools.command.test import test as TestCommand1213here = os.path.abspath(os.path.dirname(__file__))1415class PyTest(TestCommand):16 user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]1718 def initialize_options(self):19 TestCommand.initialize_options(self)Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoptiona5b8f8d
lines 20–24why, one step back20 try:21 from multiprocessing import cpu_count22 self.pytest_args = ['-n', str(cpu_count()), '--boxed']23 except (ImportError, NotImplementedError):24 self.pytest_args = ['-n', '1', '--boxed']Merge pull request #4094 from kennethreitz/flake8Kenneth Reitzbefore adoptionc77911c
lines 25–46why, one step back2526 def finalize_options(self):27 TestCommand.finalize_options(self)28 self.test_args = []29 self.test_suite = True3031 def run_tests(self):32 import pytest3334 errno = pytest.main(self.pytest_args)35 sys.exit(errno)3637# 'setup.py publish' shortcut.38if sys.argv[-1] == 'publish':39 os.system('python setup.py sdist bdist_wheel')40 os.system('twine upload dist/*')41 sys.exit()4243packages = ['requests']4445requires = [46 'chardet>=3.0.2,<3.1.0',Merge pull request #4223 from Lukasa/widen-idna-pinCory Benfieldbefore adoption9ec2005
line 47why, one step back47 'idna>=2.5,<2.7',Merge pull request #4196 from Lukasa/require-next-urllib3Ian Stapleton Cordascobefore adoptionc10b838
line 48why, one step back48 'urllib3>=1.21.1,<1.23',Merge pull request #4094 from kennethreitz/flake8Kenneth Reitzbefore adoptionc77911c
lines 49–67why, one step back49 'certifi>=2017.4.17'5051]52test_requirements = ['pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock', 'pytest-xdist', 'PySocks>=1.5.6, !=1.5.7', 'pytest>=2.8.0']5354about = {}55with open(os.path.join(here, 'requests', '__version__.py'), 'r', 'utf-8') as f:56 exec(f.read(), about)5758with open('README.rst', 'r', 'utf-8') as f:59 readme = f.read()60with open('HISTORY.rst', 'r', 'utf-8') as f:61 history = f.read()6263setup(64 name=about['__title__'],65 version=about['__version__'],66 description=about['__description__'],67 long_description=readme + '\n\n' + history,Merge pull request #4631 from pradyunsg/patch-1Ian Stapleton Cordascobefore adoption5f09f0c
line 68why, one step back68 long_description_content_type='text/x-rst',Merge pull request #4094 from kennethreitz/flake8Kenneth Reitzbefore adoptionc77911c
lines 69–75why, one step back69 author=about['__author__'],70 author_email=about['__author_email__'],71 url=about['__url__'],72 packages=packages,73 package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},74 package_dir={'requests': 'requests'},75 include_package_data=True,Merge branch 'master' of github.com:requests/requestsKenneth Reitzbefore adoption3c1d36b
line 76why, one step back76 python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",Merge pull request #4094 from kennethreitz/flake8Kenneth Reitzbefore adoptionc77911c
lines 77–85why, one step back77 install_requires=requires,78 license=about['__license__'],79 zip_safe=False,80 classifiers=(81 'Development Status :: 5 - Production/Stable',82 'Intended Audience :: Developers',83 'Natural Language :: English',84 'License :: OSI Approved :: Apache Software License',85 'Programming Language :: Python',Merge pull request #4343 from jdufresne/classifierNate Prewittbefore adoption54ad3d6
line 86why, one step back86 'Programming Language :: Python :: 2',Merge pull request #4094 from kennethreitz/flake8Kenneth Reitzbefore adoptionc77911c
lines 87–103why, one step back87 'Programming Language :: Python :: 2.6',88 'Programming Language :: Python :: 2.7',89 'Programming Language :: Python :: 3',90 'Programming Language :: Python :: 3.4',91 'Programming Language :: Python :: 3.5',92 'Programming Language :: Python :: 3.6',93 'Programming Language :: Python :: Implementation :: CPython',94 'Programming Language :: Python :: Implementation :: PyPy'95 ),96 cmdclass={'test': PyTest},97 tests_require=test_requirements,98 extras_require={99 'security': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],100 'socks': ['PySocks>=1.5.6, !=1.5.7'],101 'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'],102 },103)