diff --git a/spec_files/python-fuse/no-more-distutils.patch b/spec_files/python-fuse/no-more-distutils.patch new file mode 100644 index 00000000..a8d6c115 --- /dev/null +++ b/spec_files/python-fuse/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/spec_files/python-fuse/python-fuse.spec b/spec_files/python-fuse/python-fuse.spec new file mode 100644 index 00000000..9780bf84 --- /dev/null +++ b/spec_files/python-fuse/python-fuse.spec @@ -0,0 +1,57 @@ +# +# spec file for package python-fuse +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +Name: python-fuse +Version: 1.0.7 +Release: 0 +Summary: Python bindings for FUSE +License: LGPL-2.1-only +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: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-wheel +BuildRequires: fdupes +BuildRequires: fuse-devel +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: gcc + +%description +Python bindings for FUSE (User space File System) + +%prep +%autosetup -p1 + +%build +%pyproject_wheel + +%install +%pyproject_install + +%files +%license COPYING +%doc README.* FAQ AUTHORS +%{python3_sitearch}/fuse.py +%{python3_sitearch}/__pycache__ +%{python3_sitearch}/fuseparts +%{python3_sitearch}/fuse_python-%{version}.dist-info + +%changelog