Page 1 of 1

deluge broke on archlinux

Posted: Mon Dec 13, 2021 3:27 pm
by pjlbyrne
Hi, my deluge daemon failed to restart after 'pacman -Syu' this morning.

This appears to be bacause deluge package could no longer be imported. Fair enough I would just build and install it again from the git repo.

This fails:
/home/anselm/repos/deluge/setup.py:18: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils import cmd
WARNING: The wheel package is not available.
/usr/bin/python: No module named pip
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
subprocess.check_call(cmd)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpqhu5je97', '--quiet', 'wheel']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/**/repos/deluge/setup.py", line 562, in <module>
setup(
File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 785, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 766, in resolve
dist = best[req.key] = env.best_match(
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1051, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1063, in obtain
return installer(requirement)
File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 844, in fetch_build_egg
return fetch_build_egg(self, req)
File "/usr/lib/python3.10/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpqhu5je97', '--quiet', 'wheel']' returned non-zero exit status 1.


Can someone please advise? It looks as though deluge is using distutils which is removed now.

Cheers

Re: deluge broke on archlinux

Posted: Mon Dec 13, 2021 6:05 pm
by pjlbyrne
I installed python-wheel and python-setuptools & python-wheel that fixed it.

Re: deluge broke on archlinux

Posted: Mon Dec 13, 2021 8:41 pm
by Cas
Yeah I think this is a packaging issue to report to Arch.

I will look into replacing distutils usage

Re: deluge broke on archlinux

Posted: Mon Dec 13, 2021 10:43 pm
by mhertz
I couldn't reproduce on arch btw, I mean the repo package update from 'pacman -Syu'. Try a reboot if testing that again, just in case(package had py3.9.x to 3.10.x dep rebuild etc, didnt think reboot should be needed for that specifically, but regardless - I didn't, but neither had deluged running before the update, and not using systemd for the deluged startup/shutdown either)

Thanks for reporting build issue, and to Cas for the early Christmas gift, appreciated :)

Re: deluge broke on archlinux

Posted: Tue Dec 14, 2021 12:03 am
by Cas
For reference both setuptools and wheel packages are required dependencies for setup.py so not surprised. I can't remember what I was solving with wheel requirement but it's easily available so won't change that.

The distutils package is deprecated so not removed yet, so only warnings for now and replacing usage in setup.py is rather tricky.

No problem mhertz, I'll try to keep the momentum and be more regular than bi-yearly releases :P

Re: deluge broke on archlinux

Posted: Tue Dec 14, 2021 7:41 am
by pjlbyrne
Thanks for picking this up guys.

..And thanks for your great work on deluge. I find it indispensable.