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

Trying to build v 8.0 getting missing common.py on Nixos #455

Closed
jrgiacone opened this issue Dec 14, 2022 · 4 comments
Closed

Trying to build v 8.0 getting missing common.py on Nixos #455

jrgiacone opened this issue Dec 14, 2022 · 4 comments
Labels
packaging Distribution-specific problems or requests

Comments

@jrgiacone
Copy link

Details about the problem

Trying to build the newest release for nixos. Previous version used a common,py which appears to no longer exist. Was this renamed by chance?

Code to compile

 postPatch = ''
    patchShebangs scripts
    substituteInPlace scripts/build-styles.sh \
      --replace '$(which sassc 2>/dev/null)' '${sassc}/bin/sassc' \
      --replace '$(which sass 2>/dev/null)' '${sassc}/bin/sass'
    substituteInPlace pylib/common.py \
      --replace "/usr/share/polychromatic" "$out/share/polychromatic"
  '';

Error on compile:

> substitute(): ERROR: file 'pylib/common.py' does not exist
@jrgiacone jrgiacone added the bug Faults with Polychromatic itself label Dec 14, 2022
@jrgiacone
Copy link
Author

Oh i see, pylib was renamed to polychromatic earlier this year, I will give that a try and update

@lah7 lah7 added packaging Distribution-specific problems or requests and removed bug Faults with Polychromatic itself labels Dec 15, 2022
@lah7
Copy link
Member

lah7 commented Dec 15, 2022

It did feel like something was missing from the release notes - that would be the reason, pylib is now polychromatic so the Python module namespace is consistent between the repository (development) and an installed build.

Is everything all good and up-to-date?

@jrgiacone
Copy link
Author

Is everything all good and up-to-date?

Almost I’m getting an error regarding a data folder but this could be due to my lack of understanding with packaging on nixos.

Building 7.3 worked with the old build file.

It compiles with the polychromatic name change from pylib.

When launching polychromatic-controller it complains about “ cannot locate data directory” and to reinstall

@lah7
Copy link
Member

lah7 commented Dec 15, 2022

The application expects its data directory either:

  • Relative to the application - e.g. polychromatic-controller, data/
  • or /usr/local/share/polychromatic
  • or /usr/share/polychromatic

If NixOS needs some other location, it would need to be patched at a package level. Looking the links in #306, it's probably because the file where this was patched has changed from common.py to paths.py

-substituteInPlace pylib/common.py --replace "/usr/share/polychromatic" "$out/share/polychromatic"
+substituteInPlace polychromatic/paths.py --replace "/usr/share/polychromatic" "$out/share/polychromatic"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging Distribution-specific problems or requests
Projects
None yet
Development

No branches or pull requests

2 participants