Remove deprecated distutils from setup
Adjust SPDX patch to accomdate the removed distutils Resolves: RHEL-19037
This commit is contained in:
parent
106bc795dc
commit
66872f87b2
@ -1,7 +1,7 @@
|
||||
From 8c9b74f89c616a7aebbbd159e71aeb3c49979472 Mon Sep 17 00:00:00 2001
|
||||
From 2cac6f2f0280ab45a1436881e473bf80f658068c Mon Sep 17 00:00:00 2001
|
||||
From: Clark Williams <clrkwllms@kernel.org>
|
||||
Date: Thu, 17 Aug 2023 08:12:38 -0500
|
||||
Subject: [PATCH 1/2] Add SPDX license identifiers
|
||||
Subject: [PATCH 2/3] Add SPDX license identifiers
|
||||
|
||||
use SPDX license identifiers to clarify the licences under which
|
||||
tuna is released.
|
||||
@ -81,15 +81,15 @@ index 2ca87e9edc62..a65117637160 100755
|
||||
import getopt
|
||||
import sys
|
||||
diff --git a/setup.py b/setup.py
|
||||
index f3e36529fefb..a00adb9721a8 100755
|
||||
index eed81cb0fca0..c53af9ef2f73 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
+# SPDX-License-Identifier: GPL-2.0-only
|
||||
from distutils.sysconfig import get_python_lib
|
||||
from distutils.core import setup
|
||||
from os.path import isfile, join
|
||||
import os
|
||||
import sysconfig
|
||||
from os.path import isfile, relpath
|
||||
diff --git a/testuna b/testuna
|
||||
index 4bf91ebdb76f..cb98640c0167 100755
|
||||
--- a/testuna
|
||||
@ -353,5 +353,5 @@ index de9846bb5fae..1051983e53f9 100644
|
||||
Functions to translate a scheduling policy into either a string name or an
|
||||
equivalent integer
|
||||
--
|
||||
2.41.0
|
||||
2.42.0
|
||||
|
||||
|
||||
50
tuna-Remove-distutils-from-setup.patch
Normal file
50
tuna-Remove-distutils-from-setup.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 29ee3b08da1b855cd4744223c7fd6a6599e5e11a Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Thu, 16 Feb 2023 14:29:15 -0500
|
||||
Subject: [PATCH 1/3] tuna: Remove distutils from setup
|
||||
|
||||
distutils is deprecated. Replace it with sysconfig and setuptools
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
setup.py | 17 ++++++++++-------
|
||||
1 file changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index f3e36529fefb..eed81cb0fca0 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1,15 +1,18 @@
|
||||
#!/usr/bin/python3
|
||||
-from distutils.sysconfig import get_python_lib
|
||||
-from distutils.core import setup
|
||||
-from os.path import isfile, join
|
||||
-import glob
|
||||
import os
|
||||
+import sysconfig
|
||||
+from os.path import isfile, relpath
|
||||
+from setuptools import setup
|
||||
|
||||
if isfile("MANIFEST"):
|
||||
- os.unlink("MANIFEST")
|
||||
+ os.unlink("MANIFEST")
|
||||
+
|
||||
+SCHEME = 'rpm_prefix'
|
||||
+if SCHEME not 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="tuna",
|
||||
version = "0.18",
|
||||
@@ -25,4 +28,4 @@ thread/IRQ level. Allows isolating CPUs for use by a specific application and mo
|
||||
threads and interrupts to a CPU by just dragging and dropping them.
|
||||
""",
|
||||
packages = ["tuna", "tuna/gui"],
|
||||
- )
|
||||
+)
|
||||
--
|
||||
2.42.0
|
||||
|
||||
12
tuna.spec
12
tuna.spec
@ -1,6 +1,6 @@
|
||||
Name: tuna
|
||||
Version: 0.18
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: GPLv2
|
||||
Summary: Application tuning GUI & command line utility
|
||||
Group: Applications/System
|
||||
@ -22,8 +22,9 @@ Patch4: tuna-tuna_gui.py-use-fstrings.patch
|
||||
Patch5: tuna-tuna-cmd.py-use-fstrings.patch
|
||||
Patch6: tuna-Adapt-show_threads-cgroup-output-to-terminal-si.patch
|
||||
Patch7: tuna-Fix-show_threads-cgroup-without-a-term.patch
|
||||
Patch8: Add-SPDX-license-identifiers.patch
|
||||
Patch9: tuna-Remove-spec-file-from-git.patch
|
||||
Patch8: tuna-Remove-distutils-from-setup.patch
|
||||
Patch9: Add-SPDX-license-identifiers.patch
|
||||
Patch10: tuna-Remove-spec-file-from-git.patch
|
||||
|
||||
%description
|
||||
Provides interface for changing scheduler and IRQ tunables, at whole CPU and at
|
||||
@ -82,6 +83,11 @@ rm -rf %{buildroot}
|
||||
%{_datadir}/polkit-1/actions/org.tuna.policy
|
||||
|
||||
%changelog
|
||||
* Mon Dec 11 2023 John Kacur <jkacur@redhat.com> - 0.18-8
|
||||
- Remove deprecated distutils from setup
|
||||
- Adjust SPDX patch to accomdate the removed distutils
|
||||
Resolves: RHEL-19037
|
||||
|
||||
* Wed Nov 01 2023 John Kacur <jkacur@redhat.com> - 0.18-7
|
||||
- Remove specfile from upstream source
|
||||
Resolves: RHEL-9197
|
||||
|
||||
Loading…
Reference in New Issue
Block a user