python,python3: add Py[3]Shebang functions & move outside of script
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Thu, 12 Sep 2019 12:03:50 +0000 (15:03 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Fri, 20 Sep 2019 11:10:00 +0000 (14:10 +0300)
commit721642908c2bc2f16ff371bdd33e4df02813318c
treef877972c2810fc5cdf374234be0e152944144279
parented0e77f3c385770065bf6ec6ed7c3bbbb6deb395
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>
lang/python/python-package-install.sh
lang/python/python-package.mk
lang/python/python3-package.mk