diff options
-rw-r--r-- | Manual.md | 4 | ||||
-rw-r--r-- | common/hooks/post-install/04-create-xbps-metadata-scripts.sh | 2 | ||||
-rw-r--r-- | common/hooks/pre-pkg/03-rewrite-python-shebang.sh | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/Manual.md b/Manual.md index 34c737e6df4..53a2cc8a151 100644 --- a/Manual.md +++ b/Manual.md @@ -1250,7 +1250,7 @@ package accordingly. Additionally, the following functions are available: - *vopt_feature()* `vopt_feature <option> <property>` Same as `vopt_bool`, but uses `-D<property=enabled` and - `-D<property>=disabled` respectively. + `-D<property>=disabled` respectively. The following example shows how to change a source package that uses GNU configure to enable a new build option to support PNG images: @@ -1630,6 +1630,8 @@ In most cases version is inferred from shebang, install path or build style. Only required for some multi-language applications (e.g., the application is written in C while the command is written in Python) or just single Python file ones that live in `/usr/bin`. +If `python_version` is set to `ignore`, python-containing shebangs will not be rewritten. +Use this only if a package should not be using a system version of python. Also, a set of useful variables are defined to use in the templates: diff --git a/common/hooks/post-install/04-create-xbps-metadata-scripts.sh b/common/hooks/post-install/04-create-xbps-metadata-scripts.sh index 69e318a5608..f21017f8361 100644 --- a/common/hooks/post-install/04-create-xbps-metadata-scripts.sh +++ b/common/hooks/post-install/04-create-xbps-metadata-scripts.sh @@ -272,7 +272,7 @@ _EOF fi fi - if [ -n "$python_version" ]; then + if [ -n "$python_version" ] && [ "$python_version" != ignore ]; then pycompile_version=${python_version} fi diff --git a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh index 07162ad2c69..47c7a996a50 100644 --- a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh +++ b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh @@ -12,6 +12,10 @@ hook() { pyver="$python_version" fi + if [ "$python_version" = ignore ]; then + return + fi + if [ -n "$pyver" ]; then default_shebang="#!/usr/bin/python${pyver%.*}" fi |