-
Notifications
You must be signed in to change notification settings - Fork 586
[doc] Remove deprecated call to setup.py #4042
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
base: main
Are you sure you want to change the base?
[doc] Remove deprecated call to setup.py #4042
Conversation
When running 'python3 setup.py install' we get an alert about deprecation: running install /usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! setup.py per se is not deprecated, but the way it's invoked is. This commit provides an alternative way to install sos still using setup.py. Signed-off-by: Jose Castillo <[email protected]>
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
There were at least possible solutions/substitutions here: 1- When running the command as it is now in the README, we get this after the warning:
The blog post offers as an alternative 2- There's also this doc that offers an alternative to https://packaging.python.org/en/latest/discussions/setup-py-deprecated/#setup-py-deprecated Here the command specified is:
I chose this one but can change it to the first one if you all think it's better.
|
I had a go at converting the setup.py to pyproject.toml a while back, and had got stuck (I think it was abut the |
https://setuptools.pypa.io/en/latest/userguide/declarative_config.html And: https://setuptools.pypa.io/en/latest/userguide/datafiles.html "Old packaging installation methods in the Python ecosystem have traditionally allowed installation of 'data files', which are placed in a platform-specific location." I don't believe there is a solution to this unfortunately - the Python community has made it pretty clear that the old methods for installing files in platform-specific locations isn't coming back (it's characterised as an uncommon use case in the 2nd link, but I think there are many packages that are affected by this, judging by all the hacks I've seen e.g. referenced in the below pypa issue). This pypa/packaging-problems issue talks about it a bit more in the context of man pages: For the packages I maintain that are on PyPi I've just accepted for now at least that there's no good way to install the man pages or system-wide configuration files automatically. I've implemented "config create" commands to deal with the configuration aspect, but I don't know of any general solution to the man page issue so far :sadface: |
Thank you both for your insights, it's really helpful. I noticed the same problems with man pages, and a similar one while translating/transforming from setup.py's I'll open a discussion or an issue so we can put some ideas together and track some possible solutions. |
When running 'python3 setup.py install' we get an alert about deprecation:
running install
/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !!
setup.py per se is not deprecated, but the way
it's invoked is. This commit provides an alternative way to install sos still using setup.py.
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines