diff options
| author | Alexandru Ardelean <ardeleanalex@gmail.com> | 2019-09-12 15:03:50 +0300 |
|---|---|---|
| committer | Alexandru Ardelean <ardeleanalex@gmail.com> | 2019-09-20 14:10:00 +0300 |
| commit | 721642908c2bc2f16ff371bdd33e4df02813318c (patch) | |
| tree | f877972c2810fc5cdf374234be0e152944144279 /lang/python/python-package-install.sh | |
| parent | ed0e77f3c385770065bf6ec6ed7c3bbbb6deb395 (diff) | |
python,python3: add Py[3]Shebang functions & move outside of script
Some packages just install some Python binaries, that may need their
shebang fixed.
This change adds some utilities to help with that and try to centralize the
sed rules a bit.
It also removes the logic from the `python-package-install.sh` into the
`python-package[3].mk` files. This does 2 things:
1. It minimizes the need for the shell script to know the Python
version 2/3
2. Makes the logic re-usable in packages; especially if the install rules
differ a bit
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'lang/python/python-package-install.sh')
| -rw-r--r-- | lang/python/python-package-install.sh | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lang/python/python-package-install.sh b/lang/python/python-package-install.sh index f2646f848..337727af1 100644 --- a/lang/python/python-package-install.sh +++ b/lang/python/python-package-install.sh @@ -54,8 +54,6 @@ python="$4" mode="$5" filespec="$6" -SED="${SED:-sed -e}" - find "$src_dir" -name "*.exe" -delete process_filespec "$src_dir" "$dst_dir" "$filespec" || { @@ -63,12 +61,6 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || { exit 1 } -usr_bin_dir="$dst_dir/usr/bin" - -if [ -d "$usr_bin_dir" ] ; then - $SED "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i --follow-symlinks $usr_bin_dir/* -fi - if [ "$mode" == "sources" ] ; then # Copy only python source files find "$dst_dir" -not -type d -not -name "*.py" -delete |
