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

krita: fixed missing python path #61653

Merged
merged 1 commit into from May 28, 2019
Merged

Conversation

d3rped
Copy link
Contributor

@d3rped d3rped commented May 18, 2019

Motivation for this change

Fixes #56042.
Krita no longer complains about not finding PyQt5 and sip (and in consequence no longer segfaults on exit).

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'sip'
krita.scripting: "Traceback (most recent call last):"
krita.scripting: "  File \"/nix/store/0a81gj7kskr0nbpd90x93n08xk8snw75-krita-4.1.8/lib/krita-python-libs/krita/__init__.py\", line 7, in <module>"
krita.scripting: "    from .api import *"
krita.scripting: "  File \"/nix/store/0a81gj7kskr0nbpd90x93n08xk8snw75-krita-4.1.8/lib/krita-python-libs/krita/api.py\", line 28, in <module>"
krita.scripting: "    from PyKrita.krita import *"
krita.scripting: "ModuleNotFoundError: No module named 'PyQt5'"
krita.scripting: "Could not import krita"
Things done

Added a pythonpath wrapper for the krita and kritarunner binaries.
See the postInstall phase of pyqt5.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Things to do/consider
  • PyQt5 could be added to pythonpath instead of softlinking it... Are there any guidelines on how such things should be handled?
  • Krita still complains about missing icons, we should probably add them it's actually not relevant
  • By default krita expects the font Source Sans Pro to be installed, I'm not sure if it should be included in the package though
  • Run some krita python scripts. (only quickly confirmed that Tools -> Scripts -> Scripter works)

@ofborg ofborg bot requested a review from abbradar May 18, 2019 03:52
@worldofpeace worldofpeace added the 9.needs: port to stable A PR needs a backport to the stable release. label May 18, 2019
@erictapen
Copy link
Member

@GrahamcOfBorg build krita

@worldofpeace
Copy link
Contributor

@d3rped I feel doing it like this is fine, I just wanted to know why someone couldn't do that.

If you squash your commits we should be able to merge this.
Also is this broken like this on 19.03?

@worldofpeace
Copy link
Contributor

worldofpeace commented May 28, 2019

Checked and the segfault and traceback is only on unstable.

@worldofpeace worldofpeace removed the 9.needs: port to stable A PR needs a backport to the stable release. label May 28, 2019
@worldofpeace worldofpeace merged commit 958eef3 into NixOS:master May 28, 2019
@worldofpeace
Copy link
Contributor

Thank you @d3rped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

krita python bindings
4 participants