-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
pythonPackages.sip: make sip-module name overridable #52956
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
Conversation
@@ -65,7 +67,7 @@ in buildPythonPackage { | |||
''; | |||
|
|||
postInstall = '' | |||
ln -s ${sip}/${python.sitePackages}/PyQt5/* $out/${python.sitePackages}/PyQt5 | |||
ln -s ${sip}/${python.sitePackages}/PyQt5/sip.* $out/${python.sitePackages}/PyQt5/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is based on the contents of the package at https://pypi.org/project/PyQt5-sip/ : it has only PyQt5/sip.so
(and metadata files).
@GrahamcOfBorg build python2Packages.sip python2Packages.pyqt5 python3Packages.sip python3Packages.pyqt5 |
|
||
buildPythonPackage rec { | ||
pname = "sip"; | ||
name = "${sip-module}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "${sip-module}-${version}"; | |
pname = sip-module; |
The author of sip wants it to be a private dependency of other packages by making it importable under different names.
pyqt5 5.11 has switched from sip to PyQt5.sip.
What happens when I get two versions with different names in the same closure? I'm pretty sure we get a conflict then. |
@FRidh I don't see any potential for conflict here. The different versions export modules with different names. In fact, there are cases where we do use both |
Yet the sip tool and the pyqt5 sip module may be separated further: #52968. |
If you include both in the same Python env they each provide the "same" dist-info folder. |
No, one is |
This seems to show no collisions:
"PyQt5_sip" doesn't have a public attribute so there is no trivial way to cause collisions with it. |
Motivation for this change
This is an alternative to #52897 that trades patching pyqt5 for building another copy of sip.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)