-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate bdist_dumb, bdist_rpm, bdist_dmg, bdist_msi, bdist_wininst #1988
Comments
Thanks for kicking off this process, Hugo! I think we can follow the road map from
It would probably be nice for us to prepare a blog post or some other similarly "loud" announcement of these forthcoming removals. Probably we can do that during the deprecation period, though. |
Should these commands be removed from setuptools/distutils? I understand that these formats are not going to be supported on PyPI anymore − however this is based on PyPI download statistics. Arguably, building binary releases in non-wheel binary formats is still being used for different distribution channels. In fact, I find centralising all the build meta-data in
|
PEP 527 has rationale for removing those formats from PyPI, and not only based on downloads. As of today, PyPI has now fully implemented PEP 527: |
The rationale of PEP 527 is:
and then a discussion of non-binary format and extensions. Since the commands associated with these formats are also used to build packages that are not shipped through PyPI, it makes the impact of such a deprecating these commands harder to gauge than centralized download statistics. I see nothing in there that straightforwardly implicates commands should be removed from setuptools, except for bdist_dumb. In the end, I’m only asking to be enlightened on the pros and cons of removing the bdist_rpm, bdist_dmg, bdist_msi, bdist_wininst commands from setuptools.
|
The primary motivation here is that Setuptools should no longer be a general-purpose packaging tool, but should focus on being a best-in-class build backend for the Python Packaging ecosystem, based on the standards set forth by the PyPA. To that end, Setuptools is seeking to deprecate The essential problem with supporting Instead, probably what needs to happen is for someone to build a tool to convert wheels to RPMs. Then, that tool could generate an RPM from any wheel, including those built by other backends. Maybe that's what pyp2rpm does. |
Thanks for the answer @jaraco
That makes a lot more sense than quoting PEP 527. I’m not keen on that direction, as I really valued the extensible single-entry-point interface that setuptools provided, but so be it. Note that to your point about Have you also considered what this implies for packages that extend setuptools to provide packaging support, e.g. cx_Freeze? These are doing the work you’re no longer wanting to do with
If the extensibility remains, such packages will likely have to duplicate all the |
setup.py bdist_rpm is being (slowly?) deprecated, see pypa/setuptools#1988 Also call rpmlint
setup.py bdist_rpm is being (slowly?) deprecated, see pypa/setuptools#1988 Also call rpmlint
It's been 2 years since we have start issuing deprecation warnings for Should we remove it for good in November? CC @jaraco |
What are the plans for setuptools once the |
Hi @Thisch, the plan in setuptools for the last (many) years is to phase out any CLI tool capabilities. This means that the intended public API is mostly related to standardised build backend hooks and the entry_points meant for plugins. We haven't fully discussed the future of the public API, but the items I mentioned are what I would call the planned A-tier support. |
Addressing $ make spec python3 setup.py bdist_rpm --spec-only --install-script=bdist_rpm/install_script running bdist_rpm /usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py:988: SetuptoolsDeprecationWarning: Deprecated command !! ******************************************************************************** bdist_rpm is deprecated and will be removed in a future version. Use bdist_wheel (wheel packages) instead. This deprecation is overdue, please update your project and remove deprecated calls to avoid build errors in the future. See pypa/setuptools#1988 for details. ******************************************************************************** !!
given deprecation of bdist_rpm in pypa/setuptools#1988 does not provide any solid guidance about replacements. We just use a .spec file template in the end. But it does not seem to work on CentOS Stream 8 and 9, so we have to stop testing on those. We wanted to use pyproject.toml for everything. But tool.setuptools.data-files does not respect absolute path (unlike setup.py's data_files) so that has to be done with installs in the .spec; and py-modules fails with configuration error: `tool.setuptools.py-modules[0]` must be python-module-name GIVEN VALUE: "dnf-plugins.swidtags" OFFENDING RULE: 'format' DEFINITION: { "type": "string", "format": "python-module-name" } so we have to put those in setup.cfg. https://gregoryszorc.com/blog/2023/10/30/my-user-experience-porting-off-setup.py/
to get rid of $ make spec python3 setup.py bdist_rpm --spec-only --install-script=bdist_rpm/install_script running bdist_rpm /usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py:988: SetuptoolsDeprecationWarning: Deprecated command !! ******************************************************************************** bdist_rpm is deprecated and will be removed in a future version. Use bdist_wheel (wheel packages) instead. This deprecation is overdue, please update your project and remove deprecated calls to avoid build errors in the future. See pypa/setuptools#1988 for details. ******************************************************************************** !! Given pypa/setuptools#1988 deprecates bdist_rpm but does not provide any solid guidance about replacements, we just use a .spec file template in the end. But the necessary dependencies do not seem to be present / work on CentOS Stream 8 and 9, so we have to stop testing on those. We wanted to use pyproject.toml for everything. But tool.setuptools.data-files does not respect absolute path (unlike setup.py's data_files) so that has to be done with installs in the .spec; and py-modules fails with configuration error: `tool.setuptools.py-modules[0]` must be python-module-name GIVEN VALUE: "dnf-plugins.swidtags" OFFENDING RULE: 'format' DEFINITION: { "type": "string", "format": "python-module-name" } so we have to put those in setup.cfg. https://gregoryszorc.com/blog/2023/10/30/my-user-experience-porting-off-setup.py/
Warehouse is planning on removing upload support for
bdist_dumb
,bdist_rpm
,bdist_dmg
,bdist_msi
, andbdist_wininst
:CPython's
distutils
deprecatedbdist_wininst
in 3.8:And is planning on removing
bdist_wininst
in 3.9:In this latter discussion, @pganssle said:
What's necessary to deprecate these in
setuptools
?PR #1764 deprecates
bdist_egg
. A similar pattern could be followed to add warnings inrun()
inbdist_rpm.py
andbdist_wininst.py
. Does this sound right?But I'm less clear on
bdist_dumb
,bdist_dmg
andbdist_msi
. Are these handled bysetuptools
, and if so, where?bdist_dmg
bdist_dumb
bdist_msi
bdist_rpm
Deprecate bdist_rpm #2780bdist_wininst
Deprecate bdist_wininst #2040The text was updated successfully, but these errors were encountered: