Skip to content

Commit 0938c17

Browse files
authored
Merge pull request #283 from jkloetzke/fix-python-dev
python::python3: fix dev package
2 parents 4dcdbb8 + 0aa0ce0 commit 0938c17

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

recipes/python/python3.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,16 @@ multiPackage:
101101
autotoolsPackageDev
102102
mkdir -p usr/lib/python${MAJOR_MINOR}
103103
cp $1/install/usr/lib/python${MAJOR_MINOR}/_sysconfigdata_*.py usr/lib/python${MAJOR_MINOR}
104-
# remove any absolute include-/library-paths
105-
sed -E -e "s|-[LI]/[^ ']+||" usr/lib/python${MAJOR_MINOR}/_sysconfigdata_*.py
104+
# Remove any absolute include-/library-paths and make the
105+
# data relocatable...
106+
sed -i -E \
107+
-e '1i prefix = "/".join(__file__.split("/")[:-3])' \
108+
-e "s|-[LI]/[^ ']*||g" \
109+
-e "/DESTDIRS/b" \
110+
-e "/INCLDIRSTOMAKE/b" \
111+
-e "/TZPATH/b" \
112+
-e "s|'/usr|prefix + '|" \
113+
usr/lib/python${MAJOR_MINOR}/_sysconfigdata_*.py
106114
python3 -m compileall usr/lib/python${MAJOR_MINOR}
107115
provideDeps: [ "*-dev" ]
108116

0 commit comments

Comments
 (0)