Date: Thu, 15 Dec 2022 15:15:16 GMT From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 7446740638e7 - main - */py-{gdbm,sqlite3,tkinter}: switch from distutils to setuptools Message-ID: <202212151515.2BFFFGAx010710@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=7446740638e7d833fde0962e71ef440a6af3c749 commit 7446740638e7d833fde0962e71ef440a6af3c749 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2022-12-15 15:07:26 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2022-12-15 15:14:33 +0000 */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@) --- databases/py-gdbm/files/setup3.py | 12 +++++++----- databases/py-sqlite3/files/setup3.py | 13 +++++++------ x11-toolkits/py-tkinter/files/setup3.py | 12 ++++++------ 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/databases/py-gdbm/files/setup3.py b/databases/py-gdbm/files/setup3.py index 0a947466d03e..26df5565cfd3 100644 --- a/databases/py-gdbm/files/setup3.py +++ b/databases/py-gdbm/files/setup3.py @@ -3,17 +3,19 @@ # python setup.py install # +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]] -prefix = sysconfig.PREFIX +prefix = os.path.normpath(sys.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 944c89920852..1a763dd8cb71 100644 --- a/databases/py-sqlite3/files/setup3.py +++ b/databases/py-sqlite3/files/setup3.py @@ -3,19 +3,20 @@ # python setup.py install # +import os import platform +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") + raise SystemExit("Setuptools problem") install.sub_commands = [x for x in install.sub_commands if 'egg' not in x[0]] -prefix = sysconfig.PREFIX +prefix = os.path.normpath(sys.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 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",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212151515.2BFFFGAx010710>