conda-forge / conda-forge/python-feedstock

Provide python executable compiled with enable-shared

Offen
#595 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
Shell
Sterne
47
Forks
112
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
18

Beschreibung

### Comment:

Related: https://github.com/conda-forge/python-feedstock/issues/222#issuecomment-1309248101 .
My use-case: https://github.com/lammps/lammps/issues/3520

This could be provided as a subpackage, say python-shared, and install a python.VERSION_shared that the user could symlink or put in front of $PATH, as needed.

I would have built it myself but I am a bit lost since building this recipe with enable-shared is not being easy.

The usual ways of debugging a failing conda build do not work with this package: conda debug ends up giving me an environment where there's no script to activate the environment and no build script either, perhaps because the recipe has multiple outputs and conda debug does not know what to do with it.

So far had to remove the libpython-static output, make the recipe a single output recipe, move `build_base.sh` to `build.sh`, edit out `script:build.sh`, comment out `rm .../libpython(...)$VERSION(...).a` in build_shared, and add f to `ln -sf ../../libpython${VERABI}.a libpython${VERABI}.a` in build_static.

The last hurdle is that after building, conda build packages it, where it alters the paths that libraries/execs refer too ( I'm not very knowledgeable about this) and it fails with this message, which I guess has to do with signing in osx-arm64.
PS: fixed it by editing conda-builld/.../post.py https://github.com/conda/conda-build/issues/4392#issuecomment-1310893278

Tests do not pass (tkinter something), but I installed the package anyways and for my use-case it seems to function
PS: does not. `conda_build_config.yaml` included in the repo overrode the one I had in my home folder, so it did not pick up on the `openssl==1.1` constraint and then when I replaced the python in my installation with the shared one it complained it could not find `libssl.3.dylib`.

After fixing that, for some reason 'libffi.7.dylib' was required by 'import _ctypes', which I fixed in the install environment by symlinking 'libffi.8.dylib' to 'libffi.7.dylib'.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.