From 0652b06063b98a5192d6538a989f9244dbee11df Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Sep 20 2017 12:16:59 +0000 Subject: Move pathfix.py to bindir See https://github.com/fedora-python/python-rpm-porting/issues/24 --- diff --git a/check-pyc-and-pyo-timestamps.py b/check-pyc-and-pyo-timestamps.py index aab0cc1..76a3421 100644 --- a/check-pyc-and-pyo-timestamps.py +++ b/check-pyc-and-pyo-timestamps.py @@ -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', diff --git a/python3.spec b/python3.spec index f173971..f1ede0c 100644 --- a/python3.spec +++ b/python3.spec @@ -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 - 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 - 3.6.2-18 - Fix /usr/bin/env dependency from python3-tools Resolves: rhbz#1482118