Bug 1618951
| Summary: | mpich/openmpi python modules are not loadable if python*-mpich/openmpi are not installed | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Zbigniew Jędrzejewski-Szmek <zbyszek> |
| Component: | python-rpm-generators | Assignee: | Nobody's working on this, feel free to take it <nobody> |
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | low | ||
| Version: | rawhide | CC: | cstratak, lbalhar, mcyprian, mhroncok, pviktori, shcherbina.iryna, torsava |
| Target Milestone: | --- | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Zbigniew Jędrzejewski-Szmek
2018-08-18 18:34:35 UTC
IMHO it's up to the packager to make the package works. Having the dep autogenerated would indeed be nice, but I don't consider this a bug (rather a RFE). Yes, RFE. FWIW, mpich.pth says:
import sys, os; s = os.getenv('MPI_PYTHON3_SITEARCH'); s and (s in sys.path or sys.path.append(s))
Is there some reason the module doesn't add to PYTHONPATH directly?
Note that there was talk in Python upstream about eventually removing support for executable code in .pth files, as it slows down interpreter startup (for everything that uses Python, not just the package using it), and some people see it as a security risk. I'm quite interested in mpich's use case, in case that discussion comes up again.
The module does not know which python version will be used (you load the module first, then run a number of commands, which can call either or even both python versions). Using the .pth file allows the decision whether to add /usr/lib/python3.*/site-packages or /usr/lib/python2.*/site-packages to sys.path to be delayed until the interpreter is running. This was implemented as part of https://pagure.io/packaging-committee/issue/563. > removing support for executable code in .pth files That would certainly interfere with this use case. I agree that removing executable code in .pth would make a lot of sense, but I hope that a mechanism which allows extending sys.path in a clean and extensible way is still provided. I think that rather than removing current functionality in .pth, an effort should be made to simply use some declarative mechanism there, so that in 99.9% of cases where it is not needed, the executable code is not used. Unfortunately, I don't know anyone who wants to work on this. To me, it seems that this use of environment modules is quite non-standard. This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'. This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31. |