Hi,
On Tue, 2024-09-24 at 13:03 +0200, Miro Hrončok wrote:
> Hello Pythonistas,
>
> setuptools has deprecated executing setup.py (e.g. setup.py
> build/install) long
> time ago. It is only a matter of time when it won't be possible to
> use
> %py3_build, %py3_install, and %py3_build_wheel.
>
> Recently, the removal of setup.py test broke almost 200 packages.
>
> In Fedora, the "old" macros (%py3_build, %py3_install) are:
>
> 1. deprecated:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_deprecated_macros
> 2. yet allowed:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_201x/
>
> Considering the fact that 1.6k Python packages use the macros (while
> 2k use the
> %pyproject_ ones), we are in for a lot of trouble when setuptools
> removes the
> support for setup.py build/install.
>
> To prevent such disaster I'd like to:
>
I'd like have a place where we can consult when we are working on a
random python package , something like an quick how to convert macros
or and a FAQ ,
for example with: " if your package still uses the `setup.py test`
command (deprecated for 5 years), please update to %pytest, %tox,
%{python3} -m unittest, etc. "
Thank you
> - emit loud deprecation warnings from the macros, possibly with 10
> sec sleep
> - officially disallow
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_201x/
>
> A proof of concept for the deprecation is
> https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/180
>
> Later, I'd like to experiment with
> https://github.com/packit/specfile to write
> a minimal automatic convertor from the old macros to the new. It
> won't be
> perfect and likely won't be able to ditch any manually listed
> BuildRequires at
> first, but at least it might allow us to mass update spec files while
> keeping
> them buildable.
>
> Let me know what you think about this.
>
> --
> Miro Hrončok
> --
> Phone: +420777974800
> Fedora Matrix: mhroncok
>
--
Sérgio M. B.
--
_______________________________________________
python-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue