Prefer .egg-info format

This commit is contained in:
Jiri Kucera 2022-11-29 17:15:55 +01:00
parent 7aed4171dc
commit c8b2b50acd
2 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1,12 @@
diff --git a/lang/python/Makefile.in b/lang/python/Makefile.in
index c0fc091..d567ecb 100644
--- a/lang/python/Makefile.in
+++ b/lang/python/Makefile.in
@@ -802,6 +802,7 @@ install-exec-local:
--build-base="$$(basename "$${PYTHON}")-gpg" \
install \
--prefix "$(DESTDIR)$(prefix)" \
+ $${SETUP_PY_EXTRA_OPTS:-} \
--verbose ; \
done

View File

@ -22,6 +22,8 @@ Patch1001: 0001-don-t-add-extra-libraries-for-linking.patch
Patch1002: gpgme-1.3.2-largefile.patch
# Let's fix stupid AX_PYTHON_DEVEL
Patch1003: 0001-fix-stupid-ax_python_devel.patch
# Allow extra options to be passed to setup.py during installation
Patch1004: 0002-setup_py_extra_opts.patch
## upstream patches dealing with date and time overflow on 32-bit machines
# Before gpgme 1.18.0
@ -159,6 +161,12 @@ export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')"
%make_build
%install
%if 0%{?python3_version_nodots} >= 311
# When using distutils from setuptools on Python 3.11+, ./setup.py install
# use .egg format. This forces setuptools to use .egg-info format.
# SETUP_PY_EXTRA_OPTS is introduced by the Patch1004 above.
export SETUP_PY_EXTRA_OPTS="--single-version-externally-managed --root=/"
%endif
%make_install
# unpackaged files
@ -237,10 +245,10 @@ make check
%doc lang/python/README
%if 0%{?python3_version_nodots} < 311
%{python3_sitearch}/gpg-*.egg-info
%{python3_sitearch}/gpg/
%else
%{python3_sitearch}/gpg-*.egg/
%{python3_sitearch}/gpg-*.egg-info/
%endif
%{python3_sitearch}/gpg/
%changelog
%autochangelog