Skip to content
Myr

setup.py

This file

Path

setup.py

118 lines · 3.7 KiB · Python

Last changed by

General cleanup for 2.27.0Nate Prewittbefore adoption17e6e27

History of this file

Take it

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

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 1–43why, one step back
1#!/usr/bin/env python
2# Learn more: https://github.com/kennethreitz/setup.py3import os4import sys56from codecs import open78from setuptools import setup9from setuptools.command.test import test as TestCommand1011here = os.path.abspath(os.path.dirname(__file__))1213class PyTest(TestCommand):14 user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]1516 def initialize_options(self):17 TestCommand.initialize_options(self)18 try:19 from multiprocessing import cpu_count20 self.pytest_args = ['-n', str(cpu_count()), '--boxed']21 except (ImportError, NotImplementedError):22 self.pytest_args = ['-n', '1', '--boxed']2324 def finalize_options(self):25 TestCommand.finalize_options(self)26 self.test_args = []27 self.test_suite = True2829 def run_tests(self):30 import pytest3132 errno = pytest.main(self.pytest_args)33 sys.exit(errno)3435# 'setup.py publish' shortcut.36if sys.argv[-1] == 'publish':37 os.system('python setup.py sdist bdist_wheel')38 os.system('twine upload dist/*')39 sys.exit()4041packages = ['requests']4243requires = [

Switch LGPL'd chardet for MIT licensed charset_normalizer (#5797)Ash Berlin-Taylorbefore adoption2ed84f5

lines 44–45why, one step back
44 'charset_normalizer~=2.0.0; python_version >= "3"',
45 'chardet>=3.0.2,<5; python_version < "3"',

Allow idna 3.x to be installed on Python 3.xNaor Livnebefore adoption33cf965

lines 46–47why, one step back
46 'idna>=2.5,<3; python_version < "3"',
47 'idna>=2.5,<4; python_version >= "3"',

v2.25.0Nate Prewittbefore adoption03957eb

line 48why, one step back
48 'urllib3>=1.21.1,<1.27',

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 49–77why, one step back
49 'certifi>=2017.4.17'
5051]52test_requirements = [53 'pytest-httpbin==0.0.7',54 'pytest-cov',55 'pytest-mock',56 'pytest-xdist',57 'PySocks>=1.5.6, !=1.5.7',58 'pytest>=3'59]6061about = {}62with open(os.path.join(here, 'requests', '__version__.py'), 'r', 'utf-8') as f:63 exec(f.read(), about)6465with open('README.md', 'r', 'utf-8') as f:66 readme = f.read()6768setup(69 name=about['__title__'],70 version=about['__version__'],71 description=about['__description__'],72 long_description=readme,73 long_description_content_type='text/markdown',74 author=about['__author__'],75 author_email=about['__author_email__'],76 url=about['__url__'],77 packages=packages,

v2.25.0Nate Prewittbefore adoption03957eb

line 78why, one step back
78 package_data={'': ['LICENSE', 'NOTICE']},

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 79–80why, one step back
79 package_dir={'requests': 'requests'},
80 include_package_data=True,

Disable requests[security] and remove 3.5 support referencesNate Prewittbefore adoptionf6c0619

line 81why, one step back
81 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 82–86why, one step back
82 install_requires=requires,
83 license=about['__license__'],84 zip_safe=False,85 classifiers=[86 'Development Status :: 5 - Production/Stable',

General cleanup for 2.27.0Nate Prewittbefore adoption17e6e27

line 87why, one step back
87 'Environment :: Web Environment',

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 88–89why, one step back
88 'Intended Audience :: Developers',
89 'License :: OSI Approved :: Apache Software License',

General cleanup for 2.27.0Nate Prewittbefore adoption17e6e27

lines 90–91why, one step back
90 'Natural Language :: English',
91 'Operating System :: OS Independent',

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 92–97why, one step back
92 'Programming Language :: Python',
93 'Programming Language :: Python :: 2',94 'Programming Language :: Python :: 2.7',95 'Programming Language :: Python :: 3',96 'Programming Language :: Python :: 3.6',97 'Programming Language :: Python :: 3.7',

Update setup.pyKenneth Reitzbefore adoptionbc81ee3

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

v2.25.0Nate Prewittbefore adoption03957eb

line 99why, one step back
99 'Programming Language :: Python :: 3.9',

Add support for 3.10 (#5928)Nate Prewittbefore adoption248122a

line 100why, one step back
100 'Programming Language :: Python :: 3.10',

Update index.rstKenneth Reitzbefore adoption1f9ec06

line 101why, one step back
101 'Programming Language :: Python :: Implementation :: CPython',

General cleanup for 2.27.0Nate Prewittbefore adoption17e6e27

lines 102–104why, one step back
102 'Programming Language :: Python :: Implementation :: PyPy',
103 'Topic :: Internet :: WWW/HTTP',104 'Topic :: Software Development :: Libraries',

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 105–108why, one step back
105 ],
106 cmdclass={'test': PyTest},107 tests_require=test_requirements,108 extras_require={

Disable requests[security] and remove 3.5 support referencesNate Prewittbefore adoptionf6c0619

line 109why, one step back
109 'security': [],

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 110–111why, one step back
110 'socks': ['PySocks>=1.5.6, !=1.5.7'],
111 'socks:sys_platform == "win32" and python_version == "2.7"': ['win_inet_pton'],

Switch LGPL'd chardet for MIT licensed charset_normalizer (#5797)Ash Berlin-Taylorbefore adoption2ed84f5

line 112why, one step back
112 'use_chardet_on_py3': ['chardet>=3.0.2,<5']

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 113–114why, one step back
113 },
114 project_urls={

Change documentation website to requests.readthedocs.io (#5236)Sorin Sbarneabefore adoptiond2590ee

line 115why, one step back
115 'Documentation': 'https://requests.readthedocs.io',

updating project urlNate Prewittbefore adoptione08981e

line 116why, one step back
116 'Source': 'https://github.com/psf/requests',

Update index.rstKenneth Reitzbefore adoption1f9ec06

lines 117–118why, one step back
117 },
118)