setup.py
This file
Path
setup.py
104 lines · 3.2 KiB · Python
Last changed by
fix setup.pyKenneth Reitzbefore adoption0aee483
History of this fileTake it
The walk stopped after 200 commits: lines older than 889f855 point at it.
Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
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 TestCommand11Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 12why, one step back12here = os.path.abspath(os.path.dirname(__file__))Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
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)31Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 32why, one step back32# 'setup.py publish' shortcut.Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
line 33why, one step back33if sys.argv[-1] == 'publish':fix setup.pyKenneth Reitzbefore adoption0aee483
lines 34–35why, one step back34 os.system('python setup.py sdist bdist_wheel')35 os.system('twine upload dist/*')Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
lines 36–41why, one step back36 sys.exit()3738packages = [39 'requests',40 'requests.packages',41 'requests.packages.chardet',Merge pull request #4004 from Lukasa/prepare-2.14Cory Benfieldbefore adoptionbf1a2a4
line 42why, one step back42 'requests.packages.chardet.cli',Merge pull request #3620 from Lukasa/better-idnaCory Benfieldbefore adoption50486cf
line 43why, one step back43 'requests.packages.idna',Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
lines 44–48why, one step back44 'requests.packages.urllib3',45 'requests.packages.urllib3.packages',46 'requests.packages.urllib3.contrib',47 'requests.packages.urllib3.util',48 'requests.packages.urllib3.packages.ssl_match_hostname',Merge pull request #3621 from Lukasa/fix-packagingIan Cordascobefore adoptionb8f4c7c
line 49why, one step back49 'requests.packages.urllib3.packages.backports',Merge pull request #4004 from Lukasa/prepare-2.14Cory Benfieldbefore adoptionbf1a2a4
line 50why, one step back50 'requests.packages.urllib3.contrib._securetransport',Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
lines 51–53why, one step back51]5253requires = []Merge pull request #3795 from AdamWill/tests-require-pytest-mockCory Benfieldbefore adoptionedf09ad
line 54why, one step back54test_requirements = ['pytest>=2.8.0', 'pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock']Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
line 55why, one step back55Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 56why, one step back56about = {}__version__.pyKenneth Reitzbefore adoption14d6fa1
line 57why, one step back57with open(os.path.join(here, 'requests', '__version__.py')) as f:Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 58why, one step back58 exec(f.read(), about)Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
lines 59–65why, one step back5960with open('README.rst', 'r', 'utf-8') as f:61 readme = f.read()62with open('HISTORY.rst', 'r', 'utf-8') as f:63 history = f.read()6465setup(Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
lines 66–68why, one step back66 name=about['__title__'],67 version=about['__version__'],68 description=about['__description__'],Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
line 69why, one step back69 long_description=readme + '\n\n' + history,Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
lines 70–72why, one step back70 author=about['__author__'],71 author_email=about['__author_email__'],72 url=about['__url__'],Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
lines 73–77why, one step back73 packages=packages,74 package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},75 package_dir={'requests': 'requests'},76 include_package_data=True,77 install_requires=requires,Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b
line 78why, one step back78 license=about['__license__'],Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
lines 79–91why, one step back79 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',86 'Programming Language :: Python :: 2.6',87 'Programming Language :: Python :: 2.7',88 'Programming Language :: Python :: 3',89 'Programming Language :: Python :: 3.3',90 'Programming Language :: Python :: 3.4',91 'Programming Language :: Python :: 3.5',Merge pull request #3801 from andriisoldatenko/add-python-36Kenneth Reitzbefore adoptiona43845e
line 92why, one step back92 'Programming Language :: Python :: 3.6',Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
lines 93–98why, one step back93 'Programming Language :: Python :: Implementation :: CPython',94 'Programming Language :: Python :: Implementation :: PyPy'95 ),96 cmdclass={'test': PyTest},97 tests_require=test_requirements,98 extras_require={Merge pull request #3693 from Lukasa/setuptools-extraCory Benfieldbefore adoption7f2a415
line 99why, one step back99 'security': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],Merge pull request #3552 from Trodis/masterIan Cordascobefore adoption39b3477
line 100why, one step back100 'socks': ['PySocks>=1.5.6, !=1.5.7'],Merge pull request #4014 from Lukasa/even-more-compatCory Benfieldbefore adoption2e496c3
line 101why, one step back101 'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'],Merge pull request #3539 from RichieB2B/ncsc-nl/docufixCory Benfieldbefore adoption889f855
lines 102–103why, one step back102 },103)Merge pull request #3693 from Lukasa/setuptools-extraCory Benfieldbefore adoption7f2a415
line 104why, one step back104