-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Closed
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.6.topic: pythonPython is a high-level, general-purpose programming language.Python is a high-level, general-purpose programming language.
Description
Issue description
I would like to add support for manylinux1 wheels as a build format.
Through the use of hooks, I would do an autoPatchelf stage on the .so's where they would get patched to linux against the corresponding dependencies:
libpanelw.so.5
libncursesw.so.5
libgcc_s.so.1
libstdc++.so.6
libm.so.6
libdl.so.2
librt.so.1
libc.so.6
libnsl.so.1
libutil.so.1
libpthread.so.0
libresolv.so.2
libX11.so.6
libXext.so.6
libXrender.so.1
libICE.so.6
libSM.so.6
libGL.so.1
libgobject-2.0.so.0
libgthread-2.0.so.0
libglib-2.0.so.0
How would this look from a python package perspective?
pname = ...;
version = ...;
format = "manylinux1";
or something to that degree, there seems to be a few manylinux related PEPs: 513 571 600
I would probably also have to update fetchPypi to allow for fetching of the format as well with python version info:
fetchPypi {
inherit pname version format;
sha256 = ...;
pythonVersion = python.version;
};
Additional changes/challenges
Need someway to say that our python intepreter is conditionally able to support doing manylinux1 builds.
Proposed solution (First thing that comes to mind):
hook for preBuild:
export NIX_PYTHON_MANYLINUX=1
hook for fixupPhase:
nativeBuildInputs = nativeBuildInputs ++ [ autoPatchelfHook ];
buildInputs = buildInputs ++ [ ... list of required libraries ... ];
changes to python interpreter:
echo "import os; manylinux1_compatible = not os.environ.get('NIX_PYTHON_MANYLINUX')" >> $out/lib/${libPrefix}/_manylinux.py
cc @FRidh
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.6.topic: pythonPython is a high-level, general-purpose programming language.Python is a high-level, general-purpose programming language.