1.2.14: SetuptoolsDeprecationWarning due to the use of `sys.exit(0)`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



alsa-project/alsa-python issue #18 was opened from dvzrv:

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:
https://github.com/alsa-project/alsa-python/blob/20b2b3999f24af462815b9c86e967643ccd30037/setup.py#L74-L75

(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:

https://github.com/alsa-project/alsa-python/blob/20b2b3999f24af462815b9c86e967643ccd30037/setup.py#L77-L80

Those should be removed, as the script itself is marked as Python3 (and well of course because Python2 is long discontinued 😅).

Issue URL     : https://github.com/alsa-project/alsa-python/issues/18
Repository URL: https://github.com/alsa-project/alsa-python




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux