setup.py
This file
Path
setup.py
98 lines · 3.0 KiB · Python
Last changed by
number of cores for travisKenneth Reitzbefore adoptione6e3589
History of this fileTake it
The walk stopped after 200 commits: lines older than 5dcc039 point at it.
v2.12.5Cory Benfieldbefore adoption5dcc039
lines 1–10why, one step back1#!/usr/bin/env python23import os4import re5import sys67from codecs import open89from setuptools import setup10from setuptools.command.test import test as TestCommandnumber of cores for travisKenneth Reitzbefore adoptione6e3589
line 11why, one step back11from multiprocessing import cpu_countv2.12.5Cory Benfieldbefore adoption5dcc039
line 12why, one step back12Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 13why, one step back13here = os.path.abspath(os.path.dirname(__file__))v2.12.5Cory Benfieldbefore adoption5dcc039
lines 14–19why, one step back1415class PyTest(TestCommand):16 user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]1718 def initialize_options(self):19 TestCommand.initialize_options(self)number of cores for travisKenneth Reitzbefore adoptione6e3589
line 20why, one step back20 self.pytest_args = ['-n', str(cpu_count()), '--boxed']v2.12.5Cory Benfieldbefore adoption5dcc039
lines 21–32why, one step back2122 def finalize_options(self):23 TestCommand.finalize_options(self)24 self.test_args = []25 self.test_suite = True2627 def run_tests(self):28 import pytest2930 errno = pytest.main(self.pytest_args)31 sys.exit(errno)32Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 33why, one step back33# 'setup.py publish' shortcut.v2.12.5Cory Benfieldbefore adoption5dcc039
line 34why, one step back34if sys.argv[-1] == 'publish':fix setup.pyKenneth Reitzbefore adoption0aee483
lines 35–36why, one step back35 os.system('python setup.py sdist bdist_wheel')36 os.system('twine upload dist/*')v2.12.5Cory Benfieldbefore adoption5dcc039
lines 37–38why, one step back37 sys.exit()38vastly simpify making packages available for backwards compatibilityKenneth Reitzbefore adoption28666e5
line 39why, one step back39packages = ['requests']v2.12.5Cory Benfieldbefore adoption5dcc039
line 40why, one step back40Merge pull request #4067 from kennethreitz/depsKenneth Reitzbefore adoptiona6c3a0c
lines 41–47why, one step back41requires = [42 'chardet>=3.0.2,<3.1.0',43 'idna>=2.5,<2.6',44 'urllib3>=1.21.1,<1.22',45 'certifi>=2017.4.17'4647]Merge pull request #4083 from kennethreitz/faster-ciKenneth Reitzbefore adoption148ab30
line 48why, one step back48test_requirements = ['pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock', 'pytest-xdist', 'PySocks>=1.5.6, !=1.5.7', 'pytest>=2.8.0']v2.12.5Cory Benfieldbefore adoption5dcc039
line 49why, one step back49Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 50why, one step back50about = {}cleanup version.pyKenneth Reitzbefore adoptiona44284c
line 51why, one step back51with open(os.path.join(here, 'requests', '__version__.py'), 'r', 'utf-8') as f:Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 52why, one step back52 exec(f.read(), about)v2.12.5Cory Benfieldbefore adoption5dcc039
lines 53–59why, one step back5354with open('README.rst', 'r', 'utf-8') as f:55 readme = f.read()56with open('HISTORY.rst', 'r', 'utf-8') as f:57 history = f.read()5859setup(Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
lines 60–62why, one step back60 name=about['__title__'],61 version=about['__version__'],62 description=about['__description__'],v2.12.5Cory Benfieldbefore adoption5dcc039
line 63why, one step back63 long_description=readme + '\n\n' + history,Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
lines 64–66why, one step back64 author=about['__author__'],65 author_email=about['__author_email__'],66 url=about['__url__'],v2.12.5Cory Benfieldbefore adoption5dcc039
lines 67–71why, one step back67 packages=packages,68 package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},69 package_dir={'requests': 'requests'},70 include_package_data=True,71 install_requires=requires,Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 72why, one step back72 license=about['__license__'],v2.12.5Cory Benfieldbefore adoption5dcc039
lines 73–94why, one step back73 zip_safe=False,74 classifiers=(75 'Development Status :: 5 - Production/Stable',76 'Intended Audience :: Developers',77 'Natural Language :: English',78 'License :: OSI Approved :: Apache Software License',79 'Programming Language :: Python',80 'Programming Language :: Python :: 2.6',81 'Programming Language :: Python :: 2.7',82 'Programming Language :: Python :: 3',83 'Programming Language :: Python :: 3.3',84 'Programming Language :: Python :: 3.4',85 'Programming Language :: Python :: 3.5',86 'Programming Language :: Python :: 3.6',87 'Programming Language :: Python :: Implementation :: CPython',88 'Programming Language :: Python :: Implementation :: PyPy'89 ),90 cmdclass={'test': PyTest},91 tests_require=test_requirements,92 extras_require={93 'security': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],94 'socks': ['PySocks>=1.5.6, !=1.5.7'],Merge pull request #4014 from Lukasa/even-more-compatCory Benfieldbefore adoption2e496c3
line 95why, one step back95 'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'],v2.12.5Cory Benfieldbefore adoption5dcc039
lines 96–98why, one step back96 },97)98