summaryrefslogtreecommitdiff
path: root/x11-toolkits/py-tkinter/files/setup3.py
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2022-12-15 18:07:26 +0300
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-12-15 18:14:33 +0300
commit7446740638e7d833fde0962e71ef440a6af3c749 (patch)
treea31016baaf81fb852e84b63c7b9d0ad78d3ad016 /x11-toolkits/py-tkinter/files/setup3.py
parentdevel/stxxl: cosmetic fixes (diff)
*/py-{gdbm,sqlite3,tkinter}: switch from distutils to setuptools
For python modules which come from python itself, switch from distutils (no longer present in python 3.12) to setuptools, fixing these mudules for python 3.12. PR: 268283 Approved by: vishwin (python@)
Diffstat (limited to 'x11-toolkits/py-tkinter/files/setup3.py')
-rw-r--r--x11-toolkits/py-tkinter/files/setup3.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/x11-toolkits/py-tkinter/files/setup3.py b/x11-toolkits/py-tkinter/files/setup3.py
index bcf53d093857..d0a7fc30c0bf 100644
--- a/x11-toolkits/py-tkinter/files/setup3.py
+++ b/x11-toolkits/py-tkinter/files/setup3.py
@@ -3,20 +3,20 @@
# python setup.py install
#
-import os, string
+import os
+import sys
try:
- import distutils
- from distutils import sysconfig
- from distutils.command.install import install
- from distutils.core import setup, Extension
+ import setuptools
+ from setuptools.command.install import install
+ from setuptools import setup, Extension
except:
raise SystemExit("Distutils problem")
install.sub_commands = [x for x in install.sub_commands if 'egg' not in x[0]]
tkversion = "%%TK_VER%%"
-prefix = sysconfig.PREFIX
+prefix = os.path.normpath(sys.prefix)
# Python 1.5 doesn't have os.getenv()?
x11base = os.environ['LOCALBASE'] or '/usr/X11R6'
inc_dirs = [prefix + "/include",