Skip to content
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

A few small fixes #749

Merged
merged 10 commits into from
Dec 27, 2023
Merged

Conversation

matthijskooijman
Copy link
Member

This PR collects a number of small fixes for problems noticed around the previous release, as collected in #747, plus a few other things.

In particular, it applies some fixes to the version tracking code introduced for the 3.0.3 release, removes some unused variables to make the build more reproducible and moves some files out of the repository root.

Taken together, this PR fixes #747.

The python docs say:

> New in version 3.7: text was added as a more readable alias for universal_newlines.

So the code introduced in commit 99cef05 (Remove duplicated version
detection code from waf/wscript) broke installs on python 3.6.

This is fixed by passing an explicit encoding, which also has the effect
of opening the pipe in text mode. This could have changed to
universal_newlines instead, but that name seems a bit confusing and does
not indicate that the result will be decoded into a string instead of
returning bytes, so using encoding seems better.
This is mostly needed for the `VERSION` file, which could contain
a trailing newline (e.g. vim always adds one unless you take effort to
prevent that). For good measure, the git describe output also has
whitespace stripped.
Only DATA_DIR and VERSION are actually used.

Removing LIB_DIR helps to make reproducible packages (presumably because
then there is no reference to the build machine architecture in the
resulting installed files, producing the same package regardless of
build machine), see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028310

For consistency, just remove the other unused variables too.
This check warned against using a very old dbus version that caused
breakage. However, the check used the `distutils` package for version
comparison, but that package is deprecated and will be removed in an
upcoming python version. Since there does not seem to be a direct
alternative for version comparisons in the core Python libraries and
this check is about a 4-year old dbus version anyway, just remove the
check rather than adding an extra dependency just for this.
Copy link

github-actions bot commented Dec 3, 2023

Automatically generated build artifacts for commit 685dc5f (note: these links will expire after some time):


To test this PR, download and unzip the flatpak application above and then install with:

flatpak install Hamster.flatpak

@rhertzog
Copy link
Contributor

rhertzog commented Dec 7, 2023

FTR, if you wanted to have Python version parsing/comparison, I believe the current/modern way is to use the "packaging" module (apt install python3-packaging on Debian).

I did review your changes and they look good to me. I believe this can be merged.

@matthijskooijman
Copy link
Member Author

FTR, if you wanted to have Python version parsing/comparison, I believe the current/modern way is to use the "packaging" module (apt install python3-packaging on Debian).

Yeah, I saw that, but it did seem worth adding an external dependency just for this check.

I did review your changes and they look good to me. I believe this can be merged.

Thanks!

@matthijskooijman matthijskooijman merged commit 81be67e into projecthamster:master Dec 27, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Small fixes
2 participants