libpwquality/libpwquality-fix-python-install.patch

27 lines
1.3 KiB
Diff
Raw Permalink Normal View History

- Add libpwquality-fix-python-install.patch: Fix installation of python bindings after moving to setuptools. Without splitting root from prefix, setuptools installs all the files into the .egg directory, which in turn makes python not find the files it looks for: > python3 -c "import pwquality" Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'pwquality' > rpm -ql python3-pwquality /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/PKG-INFO /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/SOURCES.txt /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/dependency_links.txt /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/native_libs.txt /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/not-zip-safe /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/top_level.txt /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/__pycache__ /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/__pycache__/pwquality.cpython-311.pyc /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/pwquality.cpython-311-x86_64-linux-gnu.so /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/pwquality.py OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libpwquality?expand=0&rev=48
2025-01-10 12:05:57 +01:00
Index: libpwquality-1.4.5/python/Makefile.am
===================================================================
--- libpwquality-1.4.5.orig/python/Makefile.am
+++ libpwquality-1.4.5/python/Makefile.am
@@ -14,7 +14,7 @@ all-local:
CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
install-exec-local:
- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
+ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --root ${DESTDIR} --prefix=${prefix}
clean-local:
rm -rf py$(PYTHONREV)
Index: libpwquality-1.4.5/python/Makefile.in
===================================================================
--- libpwquality-1.4.5.orig/python/Makefile.in
+++ libpwquality-1.4.5/python/Makefile.in
@@ -483,7 +483,7 @@ all-local:
CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
install-exec-local:
- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
+ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --root ${DESTDIR} --prefix=${prefix}
clean-local:
rm -rf py$(PYTHONREV)