summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2022-12-15 20:29:27 +0300
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-12-15 20:31:40 +0300
commit62723bbe60705c70cf2dceb23a22a73bdd4d4ae3 (patch)
tree170da066e837a32118f6b59149b4ed2345802bec
parentdevel/delve: Update to 1.20.1 (diff)
Revert "*/py-{gdbm,sqlite3,tkinter}: switch from distutils to setuptools"
This reverts commit 7446740638e7d833fde0962e71ef440a6af3c749. The change is not valid as setuptools have deprecated setup.py, while distutils will be supported in existing point releases. Python 3.12 support will require different solution. PR: 268283
-rw-r--r--databases/py-gdbm/files/setup3.py12
-rw-r--r--databases/py-sqlite3/files/setup3.py13
-rw-r--r--x11-toolkits/py-tkinter/files/setup3.py12
3 files changed, 17 insertions, 20 deletions
diff --git a/databases/py-gdbm/files/setup3.py b/databases/py-gdbm/files/setup3.py
index 26df5565cfd3..0a947466d03e 100644
--- a/databases/py-gdbm/files/setup3.py
+++ b/databases/py-gdbm/files/setup3.py
@@ -3,19 +3,17 @@
# python setup.py install
#
-import os
-import sys
-
try:
- import setuptools
- from setuptools.command.install import install
- from setuptools import setup, Extension
+ import distutils
+ from distutils import sysconfig
+ from distutils.command.install import install
+ from distutils.core import setup, Extension
except:
raise SystemExit("Distutils problem")
install.sub_commands = [x for x in install.sub_commands if 'egg' not in x[0]]
-prefix = os.path.normpath(sys.prefix)
+prefix = sysconfig.PREFIX
inc_dirs = [prefix + "/include"]
lib_dirs = [prefix + "/lib"]
libs = ["gdbm"]
diff --git a/databases/py-sqlite3/files/setup3.py b/databases/py-sqlite3/files/setup3.py
index 1a763dd8cb71..944c89920852 100644
--- a/databases/py-sqlite3/files/setup3.py
+++ b/databases/py-sqlite3/files/setup3.py
@@ -3,20 +3,19 @@
# python setup.py install
#
-import os
import platform
-import sys
try:
- import setuptools
- from setuptools.command.install import install
- from setuptools import setup, Extension
+ import distutils
+ from distutils import sysconfig
+ from distutils.command.install import install
+ from distutils.core import setup, Extension
except:
- raise SystemExit("Setuptools problem")
+ raise SystemExit("Distutils problem")
install.sub_commands = [x for x in install.sub_commands if 'egg' not in x[0]]
-prefix = os.path.normpath(sys.prefix)
+prefix = sysconfig.PREFIX
inc_dirs = [prefix + "/include", "Modules/_sqlite"]
lib_dirs = [prefix + "/lib"]
libs = ["sqlite3"]
diff --git a/x11-toolkits/py-tkinter/files/setup3.py b/x11-toolkits/py-tkinter/files/setup3.py
index d0a7fc30c0bf..bcf53d093857 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
-import sys
+import os, string
try:
- import setuptools
- from setuptools.command.install import install
- from setuptools import setup, Extension
+ import distutils
+ from distutils import sysconfig
+ from distutils.command.install import install
+ from distutils.core 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 = os.path.normpath(sys.prefix)
+prefix = sysconfig.PREFIX
# Python 1.5 doesn't have os.getenv()?
x11base = os.environ['LOCALBASE'] or '/usr/X11R6'
inc_dirs = [prefix + "/include",