Skip to content

Commit 8dfdf5c

Browse files
authored
Merge pull request #858 from webknjaz/docs/726-py-drop-universal-whl
Update "Dropping old Python" with `universal=0`
2 parents 18c634a + e03ff97 commit 8dfdf5c

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

source/guides/dropping-older-python-versions.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,33 @@ This workflow requires that:
2222
2. The latest version of :ref:`twine` is used to upload the package,
2323
3. The user installing the package has at least Pip 9.0, or a client that supports the Metadata 1.2 specification.
2424

25+
Dealing with the universal wheels
26+
---------------------------------
27+
28+
Traditionally, projects providing Python code that is semantically
29+
compatible with both Python 2 and Python 3, produce :term:`wheels
30+
<Wheel>` that have a ``py2.py3`` tag in their names. When dropping
31+
support for Python 2, it is important not to forget to change this tag
32+
to just ``py3``. It is often configured within :file:`setup.cfg` under
33+
the ``[bdist_wheel]`` section by setting ``universal = 1`` :ref:`if they
34+
use setuptools <Universal Wheels>`.
35+
36+
If you use this method, either remove this option or section, or
37+
explicitly set ``universal`` to ``0``:
38+
39+
.. code-block:: ini
40+
41+
# setup.cfg
42+
43+
[bdist_wheel]
44+
universal = 0 # Make the generated wheels have `py3` tag
45+
46+
.. tip::
47+
48+
Since it is possible to override the :file:`setup.cfg` settings via
49+
CLI flags, make sure that your scripts don't have ``--universal`` in
50+
your package creation scripts.
51+
2552
Defining the Python version required
2653
------------------------------------
2754

0 commit comments

Comments
 (0)