Hi Hartmut,
> Für welche Fälle wird PYTHONPATH eigentlich gesetzt - sprich für welche > Fälle brauchen wir eine Lösung? > > 1. guix environment --ad-hoc python: NEIN, da das environment > "komplett" ist We set PYTHONPATH here, because the search path is attached to the “python” package. It is not needed here, but that’s how the search path mechanism works in Guix. > 2. guix package -i python: JA, python ein symlink in den store ist, > aber "site-packages" aus dem profile kommen sollen (PYTHONPATH wird > in "$GUIX_PROFILE/etc/profile" gesetzt This is the same case as above. In both cases a profile is generated and PYTHONPATH is set since the “python” package contains a search path definition for PYTHONPATH. It is not set if only a Python module is installed without “python” itself. Installing, for example, only “python-numpy” without also installing “python” won’t lead to a definition of PYTHONPATH. > 3. python Anwendungen (z.B. pdfposter): JA, im Wrapper Here we set PYTHONPATH in a wrapper script during a standard build phase of the python-build-system. (We can use wrap-script once core-updates is merged to use a Guile wrapper in the very same file.) So, there really are only two cases where we set PYTHONPATH: in profiles due to the search-path property on “python” itself, and in wrapper scripts. It is conceivable to have both cases happen at the same time: installing a Python application (or a library that also includes an executable) together with “python” into a profile would lead to having the application wrapped in PYTHONPATH at build time and it would set PYTHONPATH (e.g. by adding it to the profile’s etc/profile) because “python” is installed. -- Ricardo
