New development version 1.3.23
Second attempt to fix Python 3.12 removal of distutils (RHBZ#2155013) Remove gnulib since it is no longer bundled by upstream.
This commit is contained in:
parent
ad1866e6b9
commit
eb7eadc584
@ -1,69 +0,0 @@
|
||||
From 068ce21cee3d726aaf19d0b3a706bda66dd521b2 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 18 Oct 2022 10:55:22 +0100
|
||||
Subject: [PATCH] build: Replace Python distutils by sysconfig
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This module has been deprecated in Python >= 3.10
|
||||
(https://peps.python.org/pep-0632/). Replace distutils.sysconfig with
|
||||
sysconfig which is not quite a drop-in replacement.
|
||||
|
||||
This fix is incomplete as we still reference distutils in
|
||||
python/setup.py.in. However that is only used for PIP-style
|
||||
distributions (make -C python sdist) which we don't really use or
|
||||
recommend.
|
||||
|
||||
Thanks: Miro Hrončok
|
||||
See-also: https://peps.python.org/pep-0632/
|
||||
See-also: https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/N6ITYHLRWIDNYNXGPYG2ZHF3ZLQWZN7L/
|
||||
|
||||
Cherry picked from libguestfs commit 26940f64a7406761
|
||||
---
|
||||
configure.ac | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e65d4a0..b540df7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -271,10 +271,10 @@ AS_IF([test "x$enable_python" != "xno"],
|
||||
|
||||
AC_MSG_CHECKING([for Python include path])
|
||||
if test -z "$PYTHON_CFLAGS"; then
|
||||
- python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||
- print (distutils.sysconfig.get_python_inc ());"`
|
||||
- python_platpath=`$PYTHON -c "import distutils.sysconfig; \
|
||||
- print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
|
||||
+ python_path=`$PYTHON -c "import sysconfig; \
|
||||
+ print (sysconfig.get_path('include'));"`
|
||||
+ python_platpath=`$PYTHON -c "import sysconfig; \
|
||||
+ print (sysconfig.get_path('platinclude'));"`
|
||||
if test "$python_path" = "$python_platpath"; then
|
||||
PYTHON_CFLAGS=-I$python_path
|
||||
else
|
||||
@@ -294,16 +294,16 @@ AS_IF([test "x$enable_python" != "xno"],
|
||||
PYTHON_INSTALLDIR=
|
||||
AC_MSG_CHECKING([for Python site-packages path])
|
||||
if test -z "$PYTHON_INSTALLDIR"; then
|
||||
- PYTHON_INSTALLDIR=`$PYTHON -c "import distutils.sysconfig; \
|
||||
- print (distutils.sysconfig.get_python_lib(1,0));"`
|
||||
+ PYTHON_INSTALLDIR=`$PYTHON -c "import sysconfig; \
|
||||
+ print (sysconfig.get_path('platlib'));"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_INSTALLDIR])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for Python extension suffix (PEP-3149)])
|
||||
if test -z "$PYTHON_EXT_SUFFIX"; then
|
||||
- python_ext_suffix=`$PYTHON -c "import distutils.sysconfig; \
|
||||
- print (distutils.sysconfig.get_config_var('EXT_SUFFIX') or distutils.sysconfig.get_config_var('SO'))"`
|
||||
+ python_ext_suffix=`$PYTHON -c "import sysconfig; \
|
||||
+ print (sysconfig.get_config_var('EXT_SUFFIX') or sysconfig.get_config_var('SO'))"`
|
||||
PYTHON_EXT_SUFFIX=$python_ext_suffix
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_EXT_SUFFIX])
|
||||
--
|
||||
2.37.3
|
||||
|
32
hivex.spec
32
hivex.spec
@ -10,8 +10,8 @@
|
||||
%global verify_tarball_signature 1
|
||||
|
||||
Name: hivex
|
||||
Version: 1.3.21
|
||||
Release: 13%{?dist}
|
||||
Version: 1.3.23
|
||||
Release: 1%{?dist}
|
||||
Summary: Read and write Windows Registry binary hive files
|
||||
|
||||
License: LGPLv2
|
||||
@ -27,9 +27,6 @@ Source1: http://libguestfs.org/download/hivex/%{name}-%{version}.tar.gz.s
|
||||
Source2: libguestfs.keyring
|
||||
%endif
|
||||
|
||||
# Upstream Python removal of distutils (RHBZ#2155013)
|
||||
Patch: 0001-build-Replace-Python-distutils-by-sysconfig.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||
BuildRequires: perl-interpreter
|
||||
@ -74,9 +71,6 @@ Requires: %{name}-libs = %{version}-%{release}
|
||||
Conflicts: %{name} < 1.3.20-6
|
||||
Obsoletes: %{name} < 1.3.20-6
|
||||
|
||||
# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_exceptions
|
||||
Provides: bundled(gnulib)
|
||||
|
||||
|
||||
%description
|
||||
Hive files are the undocumented binary files that Windows uses to
|
||||
@ -236,17 +230,6 @@ rm $RPM_BUILD_ROOT%{python3_sitearch}/libhivexmod.la
|
||||
|
||||
|
||||
%check
|
||||
# Disable some gnulib tests which fail on Arm and POWER and S/390
|
||||
# (2020-07, 2020-12):
|
||||
for f in test-float test-perror2 test-pthread_sigmask1 test-strerror_r; do
|
||||
pushd gnulib/tests
|
||||
make $f
|
||||
rm -f $f
|
||||
touch $f
|
||||
chmod +x $f
|
||||
popd
|
||||
done
|
||||
|
||||
if ! make check -k; then
|
||||
for f in $( find -name test-suite.log | xargs grep -l ^FAIL: ); do
|
||||
echo
|
||||
@ -258,7 +241,7 @@ if ! make check -k; then
|
||||
fi
|
||||
|
||||
%files -f %{name}.lang
|
||||
%doc README
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/hivexget
|
||||
%{_bindir}/hivexml
|
||||
@ -269,7 +252,7 @@ fi
|
||||
|
||||
|
||||
%files libs
|
||||
%doc README
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_libdir}/libhivex.so.*
|
||||
|
||||
@ -291,7 +274,7 @@ fi
|
||||
|
||||
%if %{with ocaml}
|
||||
%files -n ocaml-%{name}
|
||||
%doc README
|
||||
%doc README.md
|
||||
%{_libdir}/ocaml/hivex
|
||||
%exclude %{_libdir}/ocaml/hivex/*.a
|
||||
%exclude %{_libdir}/ocaml/hivex/*.cmxa
|
||||
@ -329,6 +312,11 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 18 2023 Richard W.M. Jones <rjones@redhat.com> - 1.3.23-1
|
||||
- New development version 1.3.23
|
||||
- Second attempt to fix Python 3.12 removal of distutils (RHBZ#2155013)
|
||||
- Remove gnulib since it is no longer bundled by upstream.
|
||||
|
||||
* Wed Jan 04 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.3.21-13
|
||||
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2
|
||||
|
||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (hivex-1.3.21.tar.gz) = e893d9fa77655540d29ef6657764f701f9cddb33d11b2bfef36ce0c2caebab92b55a32b7e1c99efbab0d53f558a44bf1c4c6f6da13daa37d568ff96d7d28f842
|
||||
SHA512 (hivex-1.3.21.tar.gz.sig) = f70ff14ef374d1d64a9c0a95928a5c8f38f4e75671abf544850239e322ab3a3cc6788fd8be58c61c96ed3b1a34e176f01f5b027a4cf9946182e847d45a3a9ba8
|
||||
SHA512 (hivex-1.3.23.tar.gz) = 068fe81a442c8045bf9d98f0c6b782330141d8f1e104a0f191c04a2cff25ee6396c2c4777c107d595a471eb4bcbee903400c9f7946cae036165ac201587f861e
|
||||
SHA512 (hivex-1.3.23.tar.gz.sig) = 0bd9968490d96887d9be9cc0be7824cfcab6347ea9255a418c93a8e150ad551fa931ea06a7790b26748735b85caae098716ced94dea6babb7be69a0e2d0bb7c4
|
||||
|
Loading…
Reference in New Issue
Block a user