setup.py
This file
Path
setup.py
103 lines · 3.2 KiB · Python
Last changed by
take a page out of @sigmavirus42's bookKenneth Reitzbefore adoption7abfd92
History of this fileTake it
The walk stopped after 200 commits: lines older than d3567aa point at it.
Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 1–11why, one step back1#!/usr/bin/env python23import os4import re5import sys67from codecs import open89from setuptools import setup10from setuptools.command.test import test as TestCommand11__version__.pyKenneth Reitzbefore adoption3e32356
line 12why, one step back12here = os.path.abspath(os.path.dirname(__file__))Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 13–31why, one step back1314class PyTest(TestCommand):15 user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]1617 def initialize_options(self):18 TestCommand.initialize_options(self)19 self.pytest_args = []2021 def finalize_options(self):22 TestCommand.finalize_options(self)23 self.test_args = []24 self.test_suite = True2526 def run_tests(self):27 import pytest2829 errno = pytest.main(self.pytest_args)30 sys.exit(errno)31__version__.pyKenneth Reitzbefore adoption3e32356
line 32why, one step back32# 'setup.py publish' shortcut.Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 33–40why, one step back33if sys.argv[-1] == 'publish':34 os.system('python setup.py sdist upload')35 sys.exit()3637packages = [38 'requests',39 'requests.packages',40 'requests.packages.chardet',Merge pull request #4004 from Lukasa/prepare-2.14Cory Benfieldbefore adoptionbf1a2a4
line 41why, one step back41 'requests.packages.chardet.cli',Merge pull request #3620 from Lukasa/better-idnaCory Benfieldbefore adoption50486cf
line 42why, one step back42 'requests.packages.idna',Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 43–47why, one step back43 'requests.packages.urllib3',44 'requests.packages.urllib3.packages',45 'requests.packages.urllib3.contrib',46 'requests.packages.urllib3.util',47 'requests.packages.urllib3.packages.ssl_match_hostname',Merge pull request #3621 from Lukasa/fix-packagingIan Cordascobefore adoptionb8f4c7c
line 48why, one step back48 'requests.packages.urllib3.packages.backports',Merge pull request #4004 from Lukasa/prepare-2.14Cory Benfieldbefore adoptionbf1a2a4
line 49why, one step back49 'requests.packages.urllib3.contrib._securetransport',Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 50–52why, one step back50]5152requires = []Merge pull request #3795 from AdamWill/tests-require-pytest-mockCory Benfieldbefore adoptionedf09ad
line 53why, one step back53test_requirements = ['pytest>=2.8.0', 'pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock']Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
line 54why, one step back54__version__.pyKenneth Reitzbefore adoption3e32356
line 55why, one step back55about = {}better ''Kenneth Reitzbefore adoptione634ab7
line 56why, one step back56with open(os.path.join(here, 'requests', '__version__.py')) as f:__version__.pyKenneth Reitzbefore adoption3e32356
line 57why, one step back57 exec(f.read(), about)Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 58–64why, one step back5859with open('README.rst', 'r', 'utf-8') as f:60 readme = f.read()61with open('HISTORY.rst', 'r', 'utf-8') as f:62 history = f.read()6364setup(take a page out of @sigmavirus42's bookKenneth Reitzbefore adoption7abfd92
line 65why, one step back65 name=about['__title__'],__version__.pyKenneth Reitzbefore adoption3e32356
line 66why, one step back66 version=about['__version__'],take a page out of @sigmavirus42's bookKenneth Reitzbefore adoption7abfd92
line 67why, one step back67 description=about['__description__'],Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
line 68why, one step back68 long_description=readme + '\n\n' + history,take a page out of @sigmavirus42's bookKenneth Reitzbefore adoption7abfd92
lines 69–71why, one step back69 author=about['__author__'],70 author_email=about['__author_email__'],71 url=about['__url__'],Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 72–76why, one step back72 packages=packages,73 package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},74 package_dir={'requests': 'requests'},75 include_package_data=True,76 install_requires=requires,take a page out of @sigmavirus42's bookKenneth Reitzbefore adoption7abfd92
line 77why, one step back77 license=about['__license__'],Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 78–90why, one step back78 zip_safe=False,79 classifiers=(80 'Development Status :: 5 - Production/Stable',81 'Intended Audience :: Developers',82 'Natural Language :: English',83 'License :: OSI Approved :: Apache Software License',84 'Programming Language :: Python',85 'Programming Language :: Python :: 2.6',86 'Programming Language :: Python :: 2.7',87 'Programming Language :: Python :: 3',88 'Programming Language :: Python :: 3.3',89 'Programming Language :: Python :: 3.4',90 'Programming Language :: Python :: 3.5',Merge pull request #3801 from andriisoldatenko/add-python-36Kenneth Reitzbefore adoptiona43845e
line 91why, one step back91 'Programming Language :: Python :: 3.6',Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 92–97why, one step back92 'Programming Language :: Python :: Implementation :: CPython',93 'Programming Language :: Python :: Implementation :: PyPy'94 ),95 cmdclass={'test': PyTest},96 tests_require=test_requirements,97 extras_require={Merge pull request #3693 from Lukasa/setuptools-extraCory Benfieldbefore adoption7f2a415
line 98why, one step back98 'security': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],Merge pull request #3552 from Trodis/masterIan Cordascobefore adoption39b3477
line 99why, one step back99 'socks': ['PySocks>=1.5.6, !=1.5.7'],Merge pull request #4014 from Lukasa/even-more-compatCory Benfieldbefore adoption2e496c3
line 100why, one step back100 'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'],Merge pull request #3510 from nateprewitt/add_close_passthroughCory Benfieldbefore adoptiond3567aa
lines 101–102why, one step back101 },102)Merge pull request #3693 from Lukasa/setuptools-extraCory Benfieldbefore adoption7f2a415
line 103why, one step back103