setup.py
This file
Path
setup.py
107 lines · 3.2 KiB · Python
Last changed by
Merge pull request #6802 from graingert/3.13Ian Stapleton Cordascobefore adoption1ae6fc3
History of this fileTake it
The walk stopped after 200 commits: lines older than 28cc1d2 point at it.
Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 1–7why, one step back1#!/usr/bin/env python2import os3import sys4from codecs import open56from setuptools import setup7Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583
line 8why, one step back8CURRENT_PYTHON = sys.version_info[:2]Merge pull request #6642 from nateprewitt/drop_python_37Nate Prewittbefore adoption7a13c04
line 9why, one step back9REQUIRED_PYTHON = (3, 8)Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583
lines 10–21why, one step back1011if CURRENT_PYTHON < REQUIRED_PYTHON:12 sys.stderr.write(13 """14==========================15Unsupported Python version16==========================17This version of Requests requires at least Python {}.{}, but18you're trying to install it on Python {}.{}. To resolve this,19consider upgrading to a supported Python version.2021If you can't upgrade your Python version, you'll need toMerge pull request #6642 from nateprewitt/drop_python_37Nate Prewittbefore adoption7a13c04
line 22why, one step back22pin to an older version of Requests (<2.32.0).Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583
lines 23–28why, one step back23""".format(24 *(REQUIRED_PYTHON + CURRENT_PYTHON)25 )26 )27 sys.exit(1)28Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
line 29why, one step back29Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
line 30why, one step back30# 'setup.py publish' shortcut.Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
lines 31–33why, one step back31if sys.argv[-1] == "publish":32 os.system("python setup.py sdist bdist_wheel")33 os.system("twine upload dist/*")Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 34–36why, one step back34 sys.exit()3536requires = [Allow charset normalizer >=2 and <4 (#6261)deedy5before adoptionc57f1f0
line 37why, one step back37 "charset_normalizer>=2,<4",Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
line 38why, one step back38 "idna>=2.5,<4",v2.30.0Nate Prewittbefore adoption2ad18e0
line 39why, one step back39 "urllib3>=1.21.1,<3",Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
line 40why, one step back40 "certifi>=2017.4.17",Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 41–42why, one step back41]42test_requirements = [Merge pull request #6802 from graingert/3.13Ian Stapleton Cordascobefore adoption1ae6fc3
line 43why, one step back43 "pytest-httpbin==2.1.0",Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
lines 44–48why, one step back44 "pytest-cov",45 "pytest-mock",46 "pytest-xdist",47 "PySocks>=1.5.6, !=1.5.7",48 "pytest>=3",Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 49–51why, one step back49]5051about = {}Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583
line 52why, one step back52here = os.path.abspath(os.path.dirname(__file__))Move to src directory (#6506)Nate Prewittbefore adoptiond63e94f
line 53why, one step back53with open(os.path.join(here, "src", "requests", "__version__.py"), "r", "utf-8") as f:Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 54–55why, one step back54 exec(f.read(), about)55Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
line 56why, one step back56with open("README.md", "r", "utf-8") as f:Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 57–59why, one step back57 readme = f.read()5859setup(Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
lines 60–62why, one step back60 name=about["__title__"],61 version=about["__version__"],62 description=about["__description__"],Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
line 63why, one step back63 long_description=readme,Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
lines 64–69why, one step back64 long_description_content_type="text/markdown",65 author=about["__author__"],66 author_email=about["__author_email__"],67 url=about["__url__"],68 packages=["requests"],69 package_data={"": ["LICENSE", "NOTICE"]},Move to src directory (#6506)Nate Prewittbefore adoptiond63e94f
line 70why, one step back70 package_dir={"": "src"},Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
line 71why, one step back71 include_package_data=True,Merge pull request #6642 from nateprewitt/drop_python_37Nate Prewittbefore adoption7a13c04
line 72why, one step back72 python_requires=">=3.8",Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
line 73why, one step back73 install_requires=requires,Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
line 74why, one step back74 license=about["__license__"],Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 75–76why, one step back75 zip_safe=False,76 classifiers=[Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
lines 77–88why, one step back77 "Development Status :: 5 - Production/Stable",78 "Environment :: Web Environment",79 "Intended Audience :: Developers",80 "License :: OSI Approved :: Apache Software License",81 "Natural Language :: English",82 "Operating System :: OS Independent",83 "Programming Language :: Python",84 "Programming Language :: Python :: 3",85 "Programming Language :: Python :: 3.8",86 "Programming Language :: Python :: 3.9",87 "Programming Language :: Python :: 3.10",88 "Programming Language :: Python :: 3.11",Add 3.12 classifier and tox configuration (#6503)Nate Prewittbefore adoptione9fa2e2
line 89why, one step back89 "Programming Language :: Python :: 3.12",Merge pull request #6802 from graingert/3.13Ian Stapleton Cordascobefore adoption1ae6fc3
line 90why, one step back90 "Programming Language :: Python :: 3.13",Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
lines 91–95why, one step back91 "Programming Language :: Python :: 3 :: Only",92 "Programming Language :: Python :: Implementation :: CPython",93 "Programming Language :: Python :: Implementation :: PyPy",94 "Topic :: Internet :: WWW/HTTP",95 "Topic :: Software Development :: Libraries",Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 96–98why, one step back96 ],97 tests_require=test_requirements,98 extras_require={Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
lines 99–100why, one step back99 "security": [],100 "socks": ["PySocks>=1.5.6, !=1.5.7"],Update Dependency with `chardet>=3.0.2,<6` (#6179)Wong Hoi Sing Edisonbefore adoption73793ce
line 101why, one step back101 "use_chardet_on_py3": ["chardet>=3.0.2,<6"],Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 102–103why, one step back102 },103 project_urls={Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
lines 104–105why, one step back104 "Documentation": "https://requests.readthedocs.io",105 "Source": "https://github.com/psf/requests",Merge pull request #5659 from nateprewitt/contrib_cleanupIan Stapleton Cordascobefore adoption28cc1d2
lines 106–107why, one step back106 },107)