diff --git a/.gitignore b/.gitignore index 9c68488..f792df9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.swp python-linux-procfs-0.4.4.tar.bz2 /python-linux-procfs-0.4.6.tar.bz2 /python-linux-procfs-0.4.5.tar.bz2 @@ -7,3 +8,4 @@ python-linux-procfs-0.4.4.tar.bz2 /python-linux-procfs-0.6.1.tar.xz /python-linux-procfs-0.6.3.tar.xz /python-linux-procfs-0.7.0.tar.xz +/python-linux-procfs-0.7.1.tar.xz diff --git a/python-linux-procfs.spec b/python-linux-procfs.spec index c0305dc..cc33a41 100644 --- a/python-linux-procfs.spec +++ b/python-linux-procfs.spec @@ -4,8 +4,8 @@ %endif Name: python-linux-procfs -Version: 0.7.0 -Release: 6%{?dist} +Version: 0.7.1 +Release: 1%{?dist} License: GPLv2 Summary: Linux /proc abstraction classes Source: https://cdn.kernel.org/pub/software/libs/python/%{name}/%{name}-%{version}.tar.xz @@ -14,6 +14,9 @@ BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools +# Patches +Patch1: python_linux_procfs-setup.py-Remove-distutils.patch + %global _description\ Abstractions to extract information from the Linux kernel /proc files. @@ -46,13 +49,17 @@ rm -rf %{buildroot} %license COPYING %changelog +* Thu Feb 16 2023 John Kacur - 0.7.1-1 +- Rebase to 0.7.1 upstream +- Add upstream patch to remove use of distutils + * Fri Jan 20 2023 Fedora Release Engineering - 0.7.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.7.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild -* Mon Jul 07 2022 Jiri Kastner - 0.7.0-4 +* Thu Jul 07 2022 Jiri Kastner - 0.7.0-4 - Rebuilt for Python 3.11 - episodfe ii * Mon Jun 13 2022 Python Maint - 0.7.0-3 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 0000000..d069dd0 --- /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 + diff --git a/sources b/sources index bded54b..96397f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-linux-procfs-0.7.0.tar.xz) = 9b2489b47949560245fb23eefa1600869618921173a94534af4db88938fbc855ce37e24100286bdee9fd18a3f140fb86bef06fa7a473ed55e5cdde721f54113c +SHA512 (python-linux-procfs-0.7.1.tar.xz) = 0b9ff22bcaa5dd696c1ca0a248484171fd2643290ea6f4627afc2eaff4350adc682a1868f3a9cae31e9ba67d5dc2b9d42e184472314a1383e8dd01a73742b731