common: support disabling python shebang rewriting
useful if there are special python-containing shebangs that should not be rewritten, for example with Ghidra's embedded jython.
This commit is contained in:
parent
5b210379b4
commit
58705ffcbf
|
@ -1250,7 +1250,7 @@ package accordingly. Additionally, the following functions are available:
|
||||||
- *vopt_feature()* `vopt_feature <option> <property>`
|
- *vopt_feature()* `vopt_feature <option> <property>`
|
||||||
|
|
||||||
Same as `vopt_bool`, but uses `-D<property=enabled` and
|
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
|
The following example shows how to change a source package that uses GNU
|
||||||
configure to enable a new build option to support PNG images:
|
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
|
Only required for some multi-language
|
||||||
applications (e.g., the application is written in C while the command is
|
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`.
|
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:
|
Also, a set of useful variables are defined to use in the templates:
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@ _EOF
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$python_version" ]; then
|
if [ -n "$python_version" ] && [ "$python_version" != ignore ]; then
|
||||||
pycompile_version=${python_version}
|
pycompile_version=${python_version}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,10 @@ hook() {
|
||||||
pyver="$python_version"
|
pyver="$python_version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$python_version" = ignore ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$pyver" ]; then
|
if [ -n "$pyver" ]; then
|
||||||
default_shebang="#!/usr/bin/python${pyver%.*}"
|
default_shebang="#!/usr/bin/python${pyver%.*}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue