diff --git a/python-linux-procfs-0.7.0.tar.gz b/python-linux-procfs-0.7.0.tar.gz deleted file mode 100644 index 3ef79f1eb26126041c7673b08b51147acc9ad3f5..0000000000000000000000000000000000000000 Binary files a/python-linux-procfs-0.7.0.tar.gz and /dev/null differ diff --git a/python-linux-procfs-0.7.1.tar.gz b/python-linux-procfs-0.7.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4a2c2555d31a1207bc7b65e42df373952eb24c74 Binary files /dev/null and b/python-linux-procfs-0.7.1.tar.gz differ diff --git a/python-linux-procfs.spec b/python-linux-procfs.spec index 3f8e276b411b71c292b9573a12bab67269c29e39..30d12463b4108fadaaf28d4dd86b906939eb65a6 100644 --- a/python-linux-procfs.spec +++ b/python-linux-procfs.spec @@ -1,6 +1,7 @@ %define anolis_release 1 + Name: python-linux-procfs -Version: 0.7.0 +Version: 0.7.1 Release: %{anolis_release}%{?dist} License: GPLv2 Summary: Linux /proc abstraction classes @@ -8,7 +9,8 @@ Source: https://cdn.kernel.org/pub/software/libs/python/%{name}/%{name}-%{versio URL: https://rt.wiki.kernel.org/index.php/Tuna BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3-setuptools + +Patch0: python_linux_procfs-setup.py-Remove-distutils.patch %global _description\ Abstractions to extract information from the Linux kernel /proc files. @@ -24,23 +26,30 @@ Requires: python3-six %description -n python3-linux-procfs %_description %prep -%autosetup -p1 +%autosetup -p1 %{name}-%{version} + +%generate_buildrequires +%pyproject_buildrequires %build -%py3_build +%pyproject_wheel %install rm -rf %{buildroot} -%py3_install +%pyproject_install %files -n python3-linux-procfs %defattr(0755,root,root,0755) %{_bindir}/pflags %{python3_sitelib}/procfs/ %defattr(0644,root,root,0755) -%{python3_sitelib}/python_linux_procfs*.egg-info +%{python3_sitelib}/python_linux_procfs-%{version}.dist-info/ %license COPYING + %changelog +* Mon Jan 16 2023 mgb01105731 - 0.7.1-1 +- update to version 0.7.1 + * Thu Mar 10 2022 zl01087097 - 0.7.0-1 - upstream version 0.7.0 diff --git a/python_linux_procfs-setup.py-Remove-distutils.patch b/python_linux_procfs-setup.py-Remove-distutils.patch new file mode 100644 index 0000000000000000000000000000000000000000..d069dd062ef4a8952605a900c74cebe72d7b4375 --- /dev/null +++ b/python_linux_procfs-setup.py-Remove-distutils.patch @@ -0,0 +1,57 @@ +From 6862fbced61b192980b804927f98a8dc568630a5 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Thu, 16 Feb 2023 11:03:59 -0500 +Subject: [PATCH] python_linux_procfs: setup.py: Remove distutils + +distutils is deprecated, so use sysconfig instead + +different versions of python produce different results, which is why +we test which SCHEME is available before calculating our answer. + +TODO: test whether we need to calculate PYTHONLIB at all. Is it being +used during the setup? We don't appear to be using a --prefix from our +specfiles. This patch ensures that if it is used, we are getting a +correct PYTHONLIB without using distutils, but perhaps we can just drop +this section. + +We need to bump the version number as well here, it looks like it was +missed the last time. + +Signed-off-by: John Kacur +--- + setup.py | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/setup.py b/setup.py +index 0ee543487c31..92e6363abb4b 100755 +--- a/setup.py ++++ b/setup.py +@@ -1,17 +1,21 @@ + #!/usr/bin/python3 + import os +-from os.path import isfile, join +-from distutils.sysconfig import get_python_lib ++from os.path import isfile, relpath ++import sysconfig + from setuptools import setup + + if isfile("MANIFEST"): + os.unlink("MANIFEST") + ++SCHEME = 'rpm_prefix' ++if not SCHEME in sysconfig.get_scheme_names(): ++ SCHEME = 'posix_prefix' ++ + # Get PYTHONLIB with no prefix so --prefix installs work. +-PYTHONLIB = join(get_python_lib(standard_lib=1, prefix=''), 'site-packages') ++PYTHONLIB = relpath(sysconfig.get_path('platlib', SCHEME), '/usr') + + setup(name="python-linux-procfs", +- version = "0.7.0", ++ version = "0.7.1", + description = "Linux /proc abstraction classes", + author = "Arnaldo Carvalho de Melo", + author_email = "acme@redhat.com", +-- +2.39.1 +