Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Filipe Laíns
rfcs
Commits
b2ca0f56
Unverified
Commit
b2ca0f56
authored
Feb 19, 2022
by
Filipe Laíns
🌈
Browse files
rfc0010: initial version
Signed-off-by:
Filipe Laíns
<
lains@riseup.net
>
parent
0ba3b61e
Pipeline
#16023
passed with stage
in 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rfcs/0010-adopt-pep517-tooling.rst
0 → 100644
View file @
b2ca0f56
=============================================
Adopt PEP 517 tooling for all Python packages
=============================================
- Date proposed: 2022-02-19
- RFC MR: https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/0010
Summary
-------
Replace setup.py with PEP 517 tooling (python-build/python-installer) for all
Python packages.
Motivation
----------
There are two main points.
1) Direct ``setup.py`` calls are deprecated
The setuptools upstream has deprecated direct ``setup.py`` calls, and plans to
remove support for them in the future. Please see `setuptools #2088`_ and
`setuptools #2080`_ for more context.
2) ``setup.py install`` calls install old-style Python metadata
The metadata installed by ``setup.py install`` is the old-style "egg" format
(.egg-info). Is is essentially implementation-defined by setuptools and has been
replaced a standardized format (.dist-info).
By moving to the PEP 517 tooling, we will be using the wheel format, which has
the standardized metadata.
Specification
-------------
The change consists of replacing ``setup.py`` invocations with the
``python-build`` and ``python-installer`` tools.
Essentially replacing
::
python setup.py build
python setup.py install --root="$pkgdir" --optimize=1
with
::
python -m build --wheel --no-isolation
python -m installer --destdir="$pkgdir" dist/*.whl
You can find more information in the `Python packaging guidelines`_.
Drawbacks
---------
This change affects a big number of packages, so it will require some work per
part of the maintainers, but it can be done incrementally as packages are
updated.
Unresolved Questions
--------------------
None, I think.
Alternatives Considered
-----------------------
I don't think there is currently any viable alternative solution for the issues
presented.
.. _setuptools #2088: https://github.com/pypa/setuptools/issues/2088
.. _setuptools #2080: https://github.com/pypa/setuptools/issues/2080
.. _Python packaging guidelines: https://wiki.archlinux.org/title/Python_package_guidelines#Standards_based_(PEP_517)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment