Move pathfix.py to bindir

See https://github.com/fedora-python/python-rpm-porting/issues/24
This commit is contained in:
Miro Hrončok 2017-09-19 12:03:41 +02:00
parent 685fb7bc99
commit 0652b06063
2 changed files with 14 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import sys
# list of test and other files that we expect not to have bytecode
not_compiled = [
'/usr/bin/pathfix.py',
'test/bad_coding.py',
'test/bad_coding2.py',
'test/badsyntax_3131.py',

View File

@ -14,7 +14,7 @@ URL: https://www.python.org/
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
Version: %{pybasever}.2
Release: 18%{?dist}
Release: 19%{?dist}
License: Python
@ -925,6 +925,11 @@ LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
rm %{buildroot}%{pylibdir}/Tools/scripts/{2to3,idle3,pydoc3,pyvenv}
# Move pathfix.py to bindir
# See https://github.com/fedora-python/python-rpm-porting/issues/24
mv %{buildroot}%{pylibdir}/Tools/scripts/pathfix.py %{buildroot}%{_bindir}/
# Remove shebang lines from .py files that aren't executable, and
# remove executability from .py files that don't have a shebang line:
find %{buildroot} -name \*.py \
@ -955,6 +960,9 @@ find %{buildroot} -type f -a -name "*.py" -print0 | \
PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
xargs -0 %{buildroot}%{_bindir}/python%{pybasever} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{buildroot}")[2], optimize=opt) for opt in range(3) for f in sys.argv[1:]]' || :
# Since we have pathfix.py in bindir, this is created, but we don't want it
rm -rf %{buildroot}%{_bindir}/__pycache__
# Fixup permissions for shared libraries from non-standard 555 to standard 755:
find %{buildroot} -perm 555 -exec chmod 755 {} \;
@ -1342,6 +1350,7 @@ fi
%{_bindir}/python%{pybasever}-config
%{_bindir}/python%{LDVERSION_optimized}-config
%{_bindir}/python%{LDVERSION_optimized}-*-config
%{_bindir}/pathfix.py
%{_libdir}/libpython%{LDVERSION_optimized}.so
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
%{_libdir}/pkgconfig/python-%{pybasever}.pc
@ -1528,6 +1537,9 @@ fi
# ======================================================
%changelog
* Tue Sep 19 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.2-19
- Move pathfix.py to bindir, https://github.com/fedora-python/python-rpm-porting/issues/24
* Wed Sep 13 2017 Iryna Shcherbina <ishcherb@redhat.com> - 3.6.2-18
- Fix /usr/bin/env dependency from python3-tools
Resolves: rhbz#1482118