system-config-printer: use pep517 build tools

Makes things build with Python 3.12, for now.
This commit is contained in:
K900 2024-07-01 19:23:54 +03:00
parent e62732553a
commit 8424135139
2 changed files with 21 additions and 1 deletions

View File

@ -32,6 +32,9 @@ stdenv.mkDerivation rec {
sha256 = "sha256-JCdGmZk2vRn3X1BDxOJaY3Aw8dr0ODVzi0oY20ZWfRs=";
excludes = [ "NEWS" ];
})
# switch to pep517 build tools
./pep517.patch
];
buildInputs = [
@ -44,7 +47,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
pkg-config gettext libtool autoconf-archive
xmlto libxml2 docbook_xml_dtd_412 docbook_xsl desktop-file-utils
python3Packages.wrapPython
python3Packages.wrapPython python3Packages.build python3Packages.installer
python3Packages.setuptools python3Packages.wheel
wrapGAppsHook3 autoreconfHook gobject-introspection
];

View File

@ -0,0 +1,16 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,11 +59,11 @@ dbus/org.fedoraproject.Config.Printing.service: dbus/org.fedoraproject.Config.Pr
# Use distutils to build the module.
all-local: .stamp-distutils-in-builddir config.py cupshelpers/config.py
- $(PYTHON) setup.py build
+ $(PYTHON) -m build --no-isolation --outdir dist/ --wheel
# Use distutils to install the module.
install-exec-local: .stamp-distutils-in-builddir
- $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
+ $(PYTHON) -m installer --prefix=$(prefix) dist/*.whl
# Uninstall the module, crossing our fingers that we know enough
# about how distutils works to do this. Unfortunately, distutils