Skip to content

Commit 4683ff4

Browse files
committed
Added supported Python versions to package metadata
Details: * Added the 'python_requires' argument to setup() to specify the supported Python versions in the package metadata. Installers such as pip depend on that, and there are issues such as #1448 when the installer does not have that information in the package. Signed-off-by: Andreas Maier <[email protected]>
1 parent 1cb760d commit 4683ff4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Coming in build 306, as yet unreleased
2121

2222
* Support for Python 3.6 was dropped, support for later versions was improved.
2323

24+
* The supported Python versions are now provided in the package metadata for
25+
use by installers such as pip (#1448)
26+
2427
Build 305, released 2022-11-06
2528
------------------------------
2629
* Installation .exe files were deprecated.

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,6 +2249,8 @@ def convert_optional_data_files(files):
22492249
"Programming Language :: Python :: Implementation :: CPython",
22502250
]
22512251

2252+
python_requires = ">=3.7"
2253+
22522254
if "bdist_wininst" in sys.argv:
22532255
# fixup https://github.com/pypa/setuptools/issues/3284
22542256
def maybe_fixup_exes():
@@ -2301,6 +2303,7 @@ def maybe_fixup_exes():
23012303
url="https://github.com/mhammond/pywin32",
23022304
license="PSF",
23032305
classifiers=classifiers,
2306+
python_requires=python_requires,
23042307
cmdclass=cmdclass,
23052308
options={
23062309
"bdist_wininst": {

0 commit comments

Comments
 (0)