-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
Fix packaging on *ubuntu 20.04 (more specifically python version >=3.8) #665
Conversation
platform.dist() is deprecated since python version 3.5 and was removed in version 3.8. Added exception to use the distro package in that case, as suggested by the python documentation: https://docs.python.org/3.7/library/platform.html?highlight=platform#module-platform
|
Any progress? 🥺 |
While this fix is not applied and if you are not used to applying the changes by hand, an alternative way to install dupeGuru is using the dupeguru_4.0.4-0~eugenesan~bionic1.tar.xz file. If you don't install it using sudo, you can still run dupeGuru from dupeguru-4.0.4/debian/dupeguru/usr/share/dupeguru/run.py |
I can build and upload Ubuntu 20.04 package to https://launchpad.net/~dupeguru/+archive/ubuntu/ppa but you should include correctly formatted debian/changelog file into pkg/debian folder - there is a "def build_debian_changelog" in hscommon/build.py (see also package.py line 84). |
@Baltix, if all we need is the changelog, I can create one from the existing build. The debian build as it is right now does not seem to be setup to work with a PPA (in an automated fashion). Calling package.py will create what is most likely needed for a debian package in build/dupeguru-4.0.4~unstable/. Can you confirm having the changlog in pkg/debian will work? (Most information I have seen asks for a debian folder at what appears to be root level, unless nest-part works for this.) |
- Add distro as a requirement - Use distro.id() to get the id as it is a bit cleaner than distro.linux_distribution()
Merging this in, additional conversation around the PPA should probably happen over at #484. |
Hello KIAaze, Thank you for taking the time to fix this issue. Thank you. |
Since the PPA did not have a package for Ubuntu 20.04, I tried creating it myself and ran into an attribute error (no platform.dist() function).
The following changes fix it and might help with issue #484.
Of course, maybe it would be better to check for the python version or use another way instead of a try/except statement. But at least try/except should be robust.
I also changed the option to dpkg-buildpackage, so it actually makes the .deb packages I wanted.
I split my changes into two commits, depending on whether or not the second change is desirable.
The package can be built using the instructions from README.md:
$ bash -c "python3 -m venv --system-site-packages env && source env/bin/activate && pip install -r requirements.txt && python3 build.py --clean && python3 package.py"