Skip to content

Commit 6d239b0

Browse files
committed
Instruct setuptools to tag wheels w/ py2.py3
This patch marks the wheels as compabible with Python 2 and Python 3 though a tag in the filename that dependency resolvers like the one in pip would use to initially disregard candidates before looking into their core packaging metadata. Ref: pypa/setuptools#4939.
1 parent 3f0fc1e commit 6d239b0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

setup.cfg

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@ release = dists upload
33
dists = clean --all sdist bdist_wheel
44

55
[bdist_wheel]
6-
universal = 1
6+
# NOTE: This instructs `bdist_wheel` to create a wheel that with the
7+
# NOTE: tag "py2.py3" which implies that this wheel contains code
8+
# NOTE: compatible with both Python 2 and Python 3. Dependency resolvers
9+
# NOTE: will still look into what the "Requires-Python" field in the
10+
# NOTE: metadata has.
11+
# NOTE: This used to be configurable though the "universal = 1" setting
12+
# NOTE: but setuptools is deprecating it by the fall of 2025. Setting
13+
# NOTE: "python_tag" explicitly does exactly the same thing as
14+
# NOTE: "universal = 1" would.
15+
python_tag = py2.py3

0 commit comments

Comments
 (0)