summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2023-02-16 14:29:15 -0500
committerJohn Kacur <jkacur@redhat.com>2023-02-16 14:29:15 -0500
commit0705ff8d67278aec1b22e0c64826a6753a4e86f1 (patch)
tree8bba88cdf7a2c6cae0def13a6d1d8c76924c44f7
parent4ccef8c2996e59e7031e77d7f8e2b42b73036210 (diff)
downloadtuna-0705ff8d67278aec1b22e0c64826a6753a4e86f1.tar.gz
tuna: Remove distutils from setup
distutils is deprecated. Replace it with sysconfig and setuptools Signed-off-by: John Kacur <jkacur@redhat.com>
-rwxr-xr-xsetup.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index f3e3652..eed81cb 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"],
- )
+)