Skip to content
Myr

setup.py

This file

Path

setup.py

115 lines · 3.5 KiB · Python

Last changed by

Update setup.pyKenneth Reitzbefore adoptioneea96f9

History of this file

Take it

The walk stopped after 200 commits: lines older than a8972a5 point at it.

attempt new adsKenneth Reitzbefore adoptiona8972a5

line 1why, one step back
1#!/usr/bin/env python

Update setup.pyKenneth Reitzbefore adoption96b9a3f

line 2why, one step back
2# Learn more: https://github.com/kennethreitz/setup.py

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 3–18why, one step back
3import os
4import re5import sys67from codecs import open89from setuptools import setup10from setuptools.command.test import test as TestCommand1112here = os.path.abspath(os.path.dirname(__file__))1314class PyTest(TestCommand):15 user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]1617 def initialize_options(self):18 TestCommand.initialize_options(self)

Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoptiona5b8f8d

lines 19–23why, one step back
19 try:
20 from multiprocessing import cpu_count21 self.pytest_args = ['-n', str(cpu_count()), '--boxed']22 except (ImportError, NotImplementedError):23 self.pytest_args = ['-n', '1', '--boxed']

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 24–41why, one step back
24
25 def finalize_options(self):26 TestCommand.finalize_options(self)27 self.test_args = []28 self.test_suite = True2930 def run_tests(self):31 import pytest3233 errno = pytest.main(self.pytest_args)34 sys.exit(errno)3536# 'setup.py publish' shortcut.37if sys.argv[-1] == 'publish':38 os.system('python setup.py sdist bdist_wheel')39 os.system('twine upload dist/*')40 sys.exit()41

Merge pull request #4672 from requests/remove_2.6_refsNate Prewittbefore adoptiond1aeb7e

lines 42–47why, one step back
42# pyOpenSSL version 18.0.0 dropped support for Python 2.6
43if sys.version_info < (2, 7):44 PYOPENSSL_VERSION = 'pyOpenSSL >= 0.14, < 18.0.0'45else:46 PYOPENSSL_VERSION = 'pyOpenSSL >= 0.14'47

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 48–51why, one step back
48packages = ['requests']
4950requires = [51 'chardet>=3.0.2,<3.1.0',

v2.19.0Nate Prewittbefore adoption991e8b7

line 52why, one step back
52 'idna>=2.5,<2.8',

Merge pull request #4669 from michael-k/patch-1Nate Prewittbefore adoptiond98f881

line 53why, one step back
53 'urllib3>=1.21.1,<1.24',

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 54–56why, one step back
54 'certifi>=2017.4.17'
5556]

Merge branch 'master' of github.com:requests/requestsKenneth Reitzbefore adoptionfdcb717

lines 57–64why, one step back
57test_requirements = [
58 'pytest-httpbin==0.0.7',59 'pytest-cov',60 'pytest-mock',61 'pytest-xdist',62 'PySocks>=1.5.6, !=1.5.7',63 'pytest>=2.8.0'64]

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 65–69why, one step back
65
66about = {}67with open(os.path.join(here, 'requests', '__version__.py'), 'r', 'utf-8') as f:68 exec(f.read(), about)69

Update setup.pyKenneth Reitzbefore adoptioneea96f9

line 70why, one step back
70with open('README.md', 'r', 'utf-8') as f:

attempt new adsKenneth Reitzbefore adoptiona8972a5

line 71why, one step back
71 readme = f.read()

Update setup.pyKenneth Reitzbefore adoptioneea96f9

line 72why, one step back
72with open('HISTORY.md', 'r', 'utf-8') as f:

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 73–78why, one step back
73 history = f.read()
7475setup(76 name=about['__title__'],77 version=about['__version__'],78 description=about['__description__'],

Update setup.pyKenneth Reitzbefore adoptioneea96f9

lines 79–80why, one step back
79 long_description=readme,
80 long_description_content_type='text/markdown',

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 81–87why, one step back
81 author=about['__author__'],
82 author_email=about['__author_email__'],83 url=about['__url__'],84 packages=packages,85 package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},86 package_dir={'requests': 'requests'},87 include_package_data=True,

Merge branch 'master' of github.com:requests/requestsKenneth Reitzbefore adoption3c1d36b

line 88why, one step back
88 python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 89–91why, one step back
89 install_requires=requires,
90 license=about['__license__'],91 zip_safe=False,

represent classifiers as list instead of tupleNate Prewittbefore adoption489f58c

line 92why, one step back
92 classifiers=[

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 93–97why, one step back
93 'Development Status :: 5 - Production/Stable',
94 'Intended Audience :: Developers',95 'Natural Language :: English',96 'License :: OSI Approved :: Apache Software License',97 'Programming Language :: Python',

Merge pull request #4343 from jdufresne/classifierNate Prewittbefore adoption54ad3d6

line 98why, one step back
98 'Programming Language :: Python :: 2',

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 99–103why, one step back
99 'Programming Language :: Python :: 2.7',
100 'Programming Language :: Python :: 3',101 'Programming Language :: Python :: 3.4',102 'Programming Language :: Python :: 3.5',103 'Programming Language :: Python :: 3.6',

Add official Python 3.7 support (#4717)Eric Brownbefore adoption6686ac1

line 104why, one step back
104 'Programming Language :: Python :: 3.7',

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 105–106why, one step back
105 'Programming Language :: Python :: Implementation :: CPython',
106 'Programming Language :: Python :: Implementation :: PyPy'

represent classifiers as list instead of tupleNate Prewittbefore adoption489f58c

line 107why, one step back
107 ],

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 108–110why, one step back
108 cmdclass={'test': PyTest},
109 tests_require=test_requirements,110 extras_require={

Merge pull request #4672 from requests/remove_2.6_refsNate Prewittbefore adoptiond1aeb7e

line 111why, one step back
111 'security': [PYOPENSSL_VERSION, 'cryptography>=1.3.4', 'idna>=2.0.0'],

attempt new adsKenneth Reitzbefore adoptiona8972a5

lines 112–115why, one step back
112 'socks': ['PySocks>=1.5.6, !=1.5.7'],
113 'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'],114 },115)