-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi! 👋
I package this project for Arch Linux.
During update to 1.2.14 I noticed that setuptools now raises the following warning:
/usr/lib/python3.13/site-packages/setuptools/build_meta.py:522: SetuptoolsDeprecationWarning: Running `setup.py` directly as CLI tool is deprecated.
!!
********************************************************************************
Please avoid using `sys.exit(0)` or similar statements that don't fit in the paradigm of a configuration file.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
super().run_setup(setup_script=setup_script)
This appears to be triggered by the sys.exit(0)
call in setup.py:
Lines 74 to 75 in 20b2b39
if sys.argv[1] != 'build': | |
sys.exit(0) |
(Setuptools now offers one of the various PEP517 build backends and calling setup.py directly as a script is deprecated).
Looking at the file I noticed that there are still conditionals that accommodate Python2:
Lines 77 to 80 in 20b2b39
if sys.version_info < (3, 0): | |
dir = 'build/lib.%s-%s-%s/pyalsa' % (uname[0].lower(), uname[4], sys.version[:3]) | |
else: | |
dir = 'build/lib.%s-%s-cpython-%s%s/pyalsa' % (uname[0].lower(), uname[4], sys.version_info.major, sys.version_info.minor) |
Those should be removed, as the script itself is marked as Python3 (and well of course because Python2 is long discontinued 😅).
Metadata
Metadata
Assignees
Labels
No labels