Skip to content
This repository was archived by the owner on Mar 15, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions projects/python.org/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ build:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
freedesktop.org/pkg-config: ^0.29
crates.io/semverator: '*'

#TODO use the diff
#TODO $libdir/_sysconfigdata__darwin_darwin.py contains non-relocatable paths
Expand All @@ -59,9 +60,15 @@ build:
done
ln -sf python{{ version.marketing }}-config python-config

# older versions use a different config dir
if semverator satisfies '<3.8' {{ version }}; then
confdir=$(echo $confdir | sed -e 's/\(config-{{ version.marketing }}\)/\1m/')
fi

# make relocatable
cd {{prefix}}
for binfile in $shebangs $confdir/python-config.py; do
binfile=$(readlink -f $binfile)
sed -i.bak -e 's|#!{{ prefix }}/bin/|#!/usr/bin/env |g' $binfile
rm $binfile.bak
done
Comment on lines 70 to 74
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably need to use this trick more often.

Expand Down