51 lines
1.4 KiB
Diff
51 lines
1.4 KiB
Diff
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
|
|
|