-
Notifications
You must be signed in to change notification settings - Fork 164
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
Remove use of distutils #554
Remove use of distutils #554
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d1eadd3
to
55b6cff
Compare
PEP 632 reference added. |
Should the new dependency also be added to the |
@deltragon That's a good question which I cannot adequately answer as I have never done Debian packaging. If you think it should be added I can certainly add it. |
Yes, we need to add (I have been doing deb packaging for several years) |
55b6cff
to
1844649
Compare
Thanks for your input @archisman-panigrahi. I added |
In that case, we should bump python version requirement to 3.12+ in debian/control, and also remove python3-setuptools from the build-depends. |
1844649
to
2d2748f
Compare
Changes done. @archisman-panigrahi can you kindly check if the latest changes look correct? |
I verified that the deb package builds with your PR in Ubuntu 24.04 and it runs fine. Otherwise, I approve merging |
As of Python 3.12 setuptools is no longer installed by default and if setuptools is not installed distutils is not found and SafeEyes fails to start. Furthermore distutils is deprecated and should thus not be used anymore. The packaging module provides a replacement for LooseVersion and it is also recommended by PEP 632 [1]. Also update required Python version for Debian to 3.12 or newer. [1] https://peps.python.org/pep-0632/#migration-advice
2d2748f
to
5c0884f
Compare
Looks good, and I approve merging. |
By the way, is this line still necessary, if setuptools is being discontinued? https://github.com/slgobinath/SafeEyes/blob/master/setup.py#L3 |
I suppose we are not discontinuing setuptools, at least not in this PR. |
@terop @deltragon Does anyone know if safeeyes would work with older versions of python after removing the use of distutils? Right now the minimum supported python version is set to be 3.12 in debian/control However, if safe eyes works with older versions of python, I can backport it to older versions of Ubuntu in the PPA. Edit: See next comment |
I tested in virtualbox, and it turns out that the current version of safeeyes does not work with python 3.8 in ubuntu 20.04 since this commit edb5b70 (that is fine, 20.04 has a working version of safeeyes in its official repositories, and we don't need to continue supporting very old versions of ubuntu). So we can just support 22.04+ (python 3.10+). |
As of Python 3.12 setuptools is no longer installed by default and if setuptools is not installed distutils is not found and SafeEyes fails to start.
Furthermore distutils is deprecated and should thus not be used anymore. The packaging module provides a replacement for LooseVersion and it is added in this commit.