Skip to content

Commit

Permalink
Set up building py3 tagged wheels in setup.cfg
Browse files Browse the repository at this point in the history
Before this change, `[bdist_wheel]` section of `setup.cfg` had
`universal = 1` set and causing our automation to publish wheels
tagged with `py2.py3` which implies that this wheel contains Python 2
compatible code.
It is now corrected to produce just `py3` tag instead.

Thanks to Bernát Gábor for pointing out that it's misconfigured!

Ref: pypa/packaging.python.org#726

Co-Authored-By: Bernát Gábor <[email protected]>
  • Loading branch information
webknjaz and gaborbernat committed Mar 8, 2021
1 parent 3dcf71a commit c349f8d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
[bdist_wheel]
universal = 1
# NOTE: "universal = 1" causes `bdist_wheel` to create a wheel that with the

This comment has been minimized.

Copy link
@gaborbernat

gaborbernat Mar 11, 2021

Author Contributor

I mean if you just remove it means you don't need these 10 lines of text 🤔

This comment has been minimized.

Copy link
@webknjaz

webknjaz Mar 11, 2021

Author Member

Yes but explicit seems to be substantially better than implicit. And I think I became a huge fan of proper educational comments lately so it's an excuse to have it here :)
Well, at least for some time. I'm also considering adding tag = py3 (haven't tested it yet though).

# NOTE: tag "py2.py3" which implies (and tricks pip into thinking) that this
# NOTE: wheel contains Python 2 compatible code. This is not true and conflicts
# NOTE: with the "Requires-Python" field in the metadata that says that we only
# NOTE: support Python 3.6+.
# NOTE: We need to keep it at "0" which will produce wheels tagged with "py3"
# NOTE: when built under Python 3.
# Ref: https://github.com/pypa/packaging.python.org/issues/726
universal = 0

[metadata]
name = sphinxcontrib-towncrier
Expand Down

0 comments on commit c349f8d

Please sign in to comment.