From fc2cb03eaaeb3780416c9f841e7cd897b7f91a21c85ecda85ebb017a3c065380 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 16 Jan 2024 04:59:42 +0000 Subject: [PATCH] - Add patch no-more-distutils.patch: * Stop using distutils unilaterally. - Switch to autosetup and pyproject macros. - Be more clear about files in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fuse?expand=0&rev=20 --- no-more-distutils.patch | 29 +++++++++++++++++++++++++++++ python-fuse.changes | 8 ++++++++ python-fuse.spec | 20 +++++++++++++------- 3 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 no-more-distutils.patch diff --git a/no-more-distutils.patch b/no-more-distutils.patch new file mode 100644 index 0000000..5814313 --- /dev/null +++ b/no-more-distutils.patch @@ -0,0 +1,29 @@ +From 24039401245c6ba3bfb991e690a8ad85480845a4 Mon Sep 17 00:00:00 2001 +From: Steve Kowalik +Date: Tue, 16 Jan 2024 15:43:17 +1100 +Subject: [PATCH] Do not unilaterally import distutils in setup.py + +Python 3.12 removed distutils completly, so also attempt to import +Extension from setuptools, and if that fails, to import it from +distutils. +--- + setup.py | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/setup.py b/setup.py +index 1d420b8..292ea8f 100755 +--- a/setup.py ++++ b/setup.py +@@ -7,10 +7,9 @@ + # part of the icecast project, http://svn.xiph.org/icecast/trunk/shout-python) + + try: +- from setuptools import setup ++ from setuptools import setup, Extension + except ImportError: +- from distutils.core import setup +-from distutils.core import Extension ++ from distutils.core import setup, Extension + import os + import sys + diff --git a/python-fuse.changes b/python-fuse.changes index fc2bff9..fc1d74a 100644 --- a/python-fuse.changes +++ b/python-fuse.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jan 16 04:58:18 UTC 2024 - Steve Kowalik + +- Add patch no-more-distutils.patch: + * Stop using distutils unilaterally. +- Switch to autosetup and pyproject macros. +- Be more clear about files in %files. + ------------------------------------------------------------------- Mon Dec 4 14:37:12 UTC 2023 - Dirk Müller diff --git a/python-fuse.spec b/python-fuse.spec index 9abb874..3d97632 100644 --- a/python-fuse.spec +++ b/python-fuse.spec @@ -1,7 +1,7 @@ # # spec file for package python-fuse # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,10 +22,14 @@ Version: 1.0.7 Release: 0 Summary: Python bindings for FUSE License: LGPL-2.1-only -Group: Development/Libraries/Python URL: https://github.com/libfuse/python-fuse Source: https://github.com/libfuse/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#libfuse/python-fuse#58 +Patch0: no-more-distutils.patch BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: fuse-devel BuildRequires: pkgconfig @@ -36,14 +40,14 @@ BuildRequires: python-rpm-macros Python bindings for FUSE (User space File System) %prep -%setup -q +%autosetup -p1 %build export CFLAGS="%{optflags}" -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %check @@ -52,7 +56,9 @@ export CFLAGS="%{optflags}" %files %{python_files} %license COPYING %doc README.* FAQ AUTHORS -%{python_sitearch}/fuse* -%pycache_only %{python_sitearch}/__pycache__ +%{python_sitearch}/fuse.py +%pycache_only %{python_sitearch}/__pycache__/fuse*.py* +%{python_sitearch}/fuseparts +%{python_sitearch}/fuse_python-%{version}.dist-info %changelog