Workaround for python3.12 distutils removal

This commit is contained in:
Mamoru TASAKA 2023-07-27 14:43:24 +09:00
parent 8659b6cfda
commit f481cec1f6
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- livecd-tools-31.0/Makefile.py312 2022-06-15 20:49:24.000000000 +0900
+++ livecd-tools-31.0/Makefile 2023-07-27 14:10:19.460042745 +0900
@@ -14,7 +14,7 @@ define COMPILE_PYTHON
$(PYTHON_PROGRAM) -c "import compileall as c; c.compile_dir('$(1)', force=1)"
$(PYTHON_PROGRAM) -O -c "import compileall as c; c.compile_dir('$(1)', force=1)"
endef
-PYTHONDIR := $(shell $(PYTHON_PROGRAM) -c "from __future__ import print_function; from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+PYTHONDIR := $(shell $(PYTHON_PROGRAM) -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '/usr', 'base': '/usr'}))")
all:

View File

@ -17,13 +17,14 @@
Summary: Tools for building live CDs
Name: livecd-tools
Version: 31.0
Release: 5%{?dist}
Release: 6%{?dist}
%if 0%{?fedora}
Epoch: 1
%endif
License: GPLv2
URL: https://github.com/livecd-tools/livecd-tools
Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz
Patch0: livecd-tools-31.0-py312-distutils-removal.patch
BuildRequires: make
%if %{with python2}
@ -225,6 +226,9 @@ rm -rfv %{buildroot}%{_mandir}/man8/livecd-iso-to-*
%endif
%changelog
* Thu Jul 27 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:31.0-6
- Workaround for python3.12 distutils removal
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:31.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild