forked from pool/python310
- Remove shebangs from from python-base libraries in _libdir
(bsc#1193179). - Readjust patches: - bpo-31046_ensurepip_honours_prefix.patch - decimal.patch - python-3.3.0b1-fix_date_time_compiler.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python310?expand=0&rev=21
This commit is contained in:
parent
0e5b07c51c
commit
8fefdd3811
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 29 00:17:07 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Remove shebangs from from python-base libraries in _libdir
|
||||||
|
(bsc#1193179).
|
||||||
|
- Readjust patches:
|
||||||
|
- bpo-31046_ensurepip_honours_prefix.patch
|
||||||
|
- decimal.patch
|
||||||
|
- python-3.3.0b1-fix_date_time_compiler.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 16 16:03:43 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
Tue Nov 16 16:03:43 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -402,6 +402,7 @@ other applications.
|
|||||||
# drop Autoconf version requirement
|
# drop Autoconf version requirement
|
||||||
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac
|
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac
|
||||||
|
|
||||||
|
%if %{primary_interpreter}
|
||||||
# fix shebangs - convert /usr/local/bin/python and /usr/bin/env/python to /usr/bin/python3
|
# fix shebangs - convert /usr/local/bin/python and /usr/bin/env/python to /usr/bin/python3
|
||||||
for dir in Lib Tools; do
|
for dir in Lib Tools; do
|
||||||
# find *.py, filter to files that contain bad shebangs
|
# find *.py, filter to files that contain bad shebangs
|
||||||
@ -410,6 +411,13 @@ for dir in Lib Tools; do
|
|||||||
| xargs -0 grep -lE '^#! *(/''usr/.*bin/(env +)?)?python' \
|
| xargs -0 grep -lE '^#! *(/''usr/.*bin/(env +)?)?python' \
|
||||||
| xargs sed -r -i -e '1s@^#![[:space:]]*(/''usr/(local/)?bin/(env +)?)?python([0-9]+(\.[0-9]+)?)?@#!%{_bindir}/python3@'
|
| xargs sed -r -i -e '1s@^#![[:space:]]*(/''usr/(local/)?bin/(env +)?)?python([0-9]+(\.[0-9]+)?)?@#!%{_bindir}/python3@'
|
||||||
done
|
done
|
||||||
|
%else
|
||||||
|
# For non-primary Python, just don't bother (bsc#1193179) and remove all
|
||||||
|
# those shebangs
|
||||||
|
for dir in Lib Tools; do
|
||||||
|
find $dir -name '*.py' -type f -exec sed -i '1{/^#!.*python/ d}' '{}' \;
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
# drop in-tree libffi and expat
|
# drop in-tree libffi and expat
|
||||||
rm -r Modules/_ctypes/libffi* Modules/_ctypes/darwin
|
rm -r Modules/_ctypes/libffi* Modules/_ctypes/darwin
|
||||||
|
Loading…
Reference in New Issue
Block a user