summaryrefslogtreecommitdiff
path: root/lang/python27
diff options
context:
space:
mode:
authorCharlie Li <vishwin@FreeBSD.org>2025-03-09 20:02:09 -0400
committerCharlie Li <vishwin@FreeBSD.org>2025-03-10 15:28:13 -0400
commit7e633595cf9df9a557a7d3b421b73e74ab0c057f (patch)
tree6bf4dc31a598383639c1167e9bb3d9db258d3f94 /lang/python27
parentx11-wm/icewm: the port had been updated to bugfix version 3.7.2 (diff)
lang/python27: re-add _tkinter into the distribution
x11-toolkits/py-tkinter is otherwise built separately, ie disabled in the main Python distribution build, due to circular (build) dependencies with Python itself in lang/tk*. Since this Python version is never default anymore, having been EOLed for years among other things, it is safe to re-add _tkinter as part of the main distribution build. Also update pkg-message to reflect extension module ports unavailability. This is to benefit the only remaining consumer, games/renpy, as x11-toolkits/py-tkinter transitions to Python 3+ only. The relevant OPTION has been removed as having _tkinter always present makes the option a no-op. PR: 268283
Diffstat (limited to 'lang/python27')
-rw-r--r--lang/python27/Makefile4
-rw-r--r--lang/python27/files/patch-setup.py18
-rw-r--r--lang/python27/pkg-message9
-rw-r--r--lang/python27/pkg-plist1
4 files changed, 14 insertions, 18 deletions
diff --git a/lang/python27/Makefile b/lang/python27/Makefile
index 245835f5be22..149977e9f2b6 100644
--- a/lang/python27/Makefile
+++ b/lang/python27/Makefile
@@ -1,6 +1,6 @@
PORTNAME= python
DISTVERSION= ${PYTHON_DISTVERSION}
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= lang python
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION}
PKGNAMESUFFIX= 27
@@ -16,7 +16,7 @@ LICENSE= PSFL
DEPRECATED= EOLed upstream
EXPIRATION_DATE= 2020-12-31
-USES= cpe ncurses pathfix pkgconfig readline shebangfix ssl tar:xz
+USES= cpe ncurses pathfix pkgconfig readline shebangfix ssl tar:xz tk:86
PATHFIX_MAKEFILEIN= Makefile.pre.in
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
diff --git a/lang/python27/files/patch-setup.py b/lang/python27/files/patch-setup.py
index e3223582a88d..4073b2c14719 100644
--- a/lang/python27/files/patch-setup.py
+++ b/lang/python27/files/patch-setup.py
@@ -5,9 +5,9 @@
# Description: ossaudiodev detection fix backport
---- setup.py.orig 2017-04-22 03:42:03 UTC
+--- setup.py.orig 2020-04-19 21:13:39 UTC
+++ setup.py
-@@ -15,6 +15,7 @@ from distutils.core import Extension, se
+@@ -15,6 +15,7 @@ from distutils.command.install_lib import install_lib
from distutils.command.build_ext import build_ext
from distutils.command.install import install
from distutils.command.install_lib import install_lib
@@ -15,16 +15,16 @@
from distutils.spawn import find_executable
cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
-@@ -33,7 +34,7 @@ host_platform = get_platform()
+@@ -33,7 +34,7 @@ COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
-+disabled_module_list = ["_bsddb", "_sqlite3", "_tkinter", "gdbm", "mpz"]
++disabled_module_list = ["_bsddb", "_sqlite3", "gdbm", "mpz"]
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
-@@ -1234,7 +1235,7 @@ class PyBuildExt(build_ext):
+@@ -1280,7 +1281,7 @@ class PyBuildExt(build_ext):
sysroot = macosx_sdk_root()
f = os.path.join(sysroot, f[1:])
@@ -33,7 +33,7 @@
data = open(f).read()
m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
if m is not None:
-@@ -1624,9 +1625,10 @@ class PyBuildExt(build_ext):
+@@ -1665,9 +1666,10 @@ class PyBuildExt(build_ext):
else:
missing.append('linuxaudiodev')
@@ -47,7 +47,7 @@
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
else:
missing.append('ossaudiodev')
-@@ -2200,6 +2202,22 @@ class PyBuildInstallLib(install_lib):
+@@ -2290,6 +2292,22 @@ class PyBuildInstallLib(install_lib):
def is_chmod_supported(self):
return hasattr(os, 'chmod')
@@ -70,7 +70,7 @@
SUMMARY = """
Python is an interpreted, interactive, object-oriented programming
language. It is often compared to Tcl, Perl, Scheme or Java.
-@@ -2245,7 +2263,9 @@ def main():
+@@ -2335,7 +2353,9 @@ def main():
platforms = ["Many"],
# Build info
@@ -81,7 +81,7 @@
'install_lib':PyBuildInstallLib},
# The struct module is defined here, because build_ext won't be
# called unless there's at least one extension module defined.
-@@ -2253,8 +2273,7 @@ def main():
+@@ -2343,8 +2363,7 @@ def main():
# Scripts to install
scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
diff --git a/lang/python27/pkg-message b/lang/python27/pkg-message
index 4dfd83b9274b..a7f33cdbf52c 100644
--- a/lang/python27/pkg-message
+++ b/lang/python27/pkg-message
@@ -1,13 +1,8 @@
[
{ type: install
message: <<EOM
-Note that some standard Python modules are provided as separate ports
-as they require additional dependencies. They are available as:
-
-bsddb databases/py-bsddb
-gdbm databases/py-gdbm
-sqlite3 databases/py-sqlite3
-tkinter x11-toolkits/py-tkinter
+Only the tkinter standard extension module is included or supported;
+the previous ports now only support Python 3+.
EOM
}
]
diff --git a/lang/python27/pkg-plist b/lang/python27/pkg-plist
index d6b52910f39c..16380119587e 100644
--- a/lang/python27/pkg-plist
+++ b/lang/python27/pkg-plist
@@ -1926,6 +1926,7 @@ lib/python2.7/lib-dynload/_socket.so
lib/python2.7/lib-dynload/_ssl.so
lib/python2.7/lib-dynload/_struct.so
lib/python2.7/lib-dynload/_testcapi.so
+lib/python2.7/lib-dynload/_tkinter.so
lib/python2.7/lib-dynload/array.so
lib/python2.7/lib-dynload/audioop.so
lib/python2.7/lib-dynload/binascii.so