Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
lang/python: Revert "add bytecode trigger"
This reverts commit c17ddfb.

This causes breakage on several ports, and the next iteration
requires a full exp-run. See:

Differential Revision: https://reviews.freebsd.org/D34739
  • Loading branch information
mandree committed Feb 27, 2023
1 parent d20b28d commit a9d9d3a
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 269 deletions.
8 changes: 0 additions & 8 deletions CHANGES
Expand Up @@ -10,14 +10,6 @@ in the release notes and/or placed into UPDATING.

All ports committers are allowed to commit to this file.

20230215:
AUTHOR: vishwin@FreeBSD.org

USES=python now includes SUB_LIST entries to facilitate common
substitutions for python.mk variables other than in ${PLIST}.
They are the same as PLIST_SUB, except PYTHON_INCLUDEDIR,
PYTHON_LIBDIR and PYTHON_SITELIBDIR include ${PREFIX}.

20230111:
AUTHOR: vishwin@FreeBSD.org

Expand Down
25 changes: 5 additions & 20 deletions Mk/Uses/python.mk
Expand Up @@ -257,20 +257,17 @@
# packages for different Python versions.
# default: -py${PYTHON_SUFFIX}
#
# Using USES=python also will add some useful entries to SUB_LIST and PLIST_SUB:
# Using USES=python also will add some useful entries to PLIST_SUB:
#
# PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR}
# PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR}
# PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;}
# PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;}
# PYTHON_PLATFORM=${PYTHON_PLATFORM}
# PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR}
# PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}
# PYTHON_SUFFIX=${PYTHON_SUFFIX}
# PYTHON_VER=${PYTHON_VER}
# PYTHON_VERSION=${PYTHON_VERSION}
#
# where PYTHON_INCLUDEDIR, PYTHON_LIBDIR and PYTHON_SITELIBDIR have their PREFIX
# stripped for PLIST_SUB.
#
# PYTHON2 and PYTHON3 will also be set according to the Python version:
# and PYTHON2 and PYTHON3 will be set according to the Python version:
#
# PYTHON2="" PYTHON3="@comment " for Python 2.x
# PYTHON2="@comment " PYTHON3="" for Python 3.x
Expand Down Expand Up @@ -788,16 +785,6 @@ ${_stage}_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR}
PREFIX= ${PYTHONBASE}
. endif

# Substitutions for SUB_FILES
SUB_LIST+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR} \
PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR} \
PYTHON_PLATFORM=${PYTHON_PLATFORM} \
PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR} \
PYTHON_SUFFIX=${PYTHON_SUFFIX} \
PYTHON_EXT_SUFFIX=${PYTHON_EXT_SUFFIX} \
PYTHON_VER=${PYTHON_VER} \
PYTHON_VERSION=${PYTHON_VERSION}

# Substitutions for pkg-plist
# Use a short form of the PYTHONPREFIX_*DIR variables; we don't need the
# base directory in the plist file.
Expand All @@ -810,10 +797,8 @@ PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \
PYTHON_VER=${PYTHON_VER} \
PYTHON_VERSION=${PYTHON_VERSION}
. if ${PYTHON_REL} < 30000
SUB_LIST+= PYTHON2="" PYTHON3="@comment "
PLIST_SUB+= PYTHON2="" PYTHON3="@comment "
. else
SUB_LIST+= PYTHON2="@comment " PYTHON3=""
PLIST_SUB+= PYTHON2="@comment " PYTHON3=""
. endif

Expand Down
17 changes: 0 additions & 17 deletions UPDATING
Expand Up @@ -48,23 +48,6 @@ you update your ports collection, before attempting any port upgrades.
# pkg set -o databases/mysql57-server:databases/mysql80-server
# pkg upgrade

20230215:
AFFECTS: users of python
AUTHOR: vishwin@FreeBSD.org

A trigger has been added to the lang/python3* ports to compile,
write and remove bytecode files (.pyc) in site-packages after all
pkg transactions have been completed. pkg will no longer manage
such files directly, as they are meant to be generated after
installation.

For those ports/packages that still package bytecode, some package
checksum mismatches on those files may occur. This is harmless
and will be rectified.

Technical details available at:
https://wiki.freebsd.org/Python/CompiledPackages

20230213:
Affects: users of sysutils/nut*
AUTHOR: cy@FreeBSD.org
Expand Down
12 changes: 8 additions & 4 deletions lang/python310/Makefile
@@ -1,6 +1,6 @@
PORTNAME= python
DISTVERSION= ${PYTHON_DISTVERSION}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= lang python
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION:C/[a-z].*//}
PKGNAMESUFFIX= ${PYTHON_SUFFIX}
Expand All @@ -15,8 +15,8 @@ LICENSE= PSFL

LIB_DEPENDS= libffi.so:devel/libffi

USES= compiler:c11 cpe ncurses pathfix pkgconfig \
python:${PYTHON_DISTVERSION:R},env readline shebangfix ssl tar:xz trigger
USES= compiler:c11 cpe ncurses pathfix pkgconfig readline \
shebangfix ssl tar:xz
PATHFIX_MAKEFILEIN= Makefile.pre.in
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
Expand All @@ -25,7 +25,11 @@ SHEBANG_FILES= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
SHEBANG_FILES+= Lib/test/ziptestdata/exe_with_z64 \
Lib/test/ziptestdata/exe_with_zip \
Lib/test/ziptestdata/header.sh
TRIGGERS= ${PYTHON_VERSION}

# Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits.
PYTHON_VER= ${PYTHON_DISTVERSION:R}
PYTHON_VERSION= python${PYTHON_VER}
PYTHON_SUFFIX= ${PYTHON_VER:S/.//g}

DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm
CONFIGURE_ARGS+= --enable-shared --without-ensurepip \
Expand Down
40 changes: 0 additions & 40 deletions lang/python310/files/python3.10.ucl.in

This file was deleted.

12 changes: 8 additions & 4 deletions lang/python311/Makefile
@@ -1,6 +1,6 @@
PORTNAME= python
DISTVERSION= ${PYTHON_DISTVERSION}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= lang python
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION:C/[a-z].*//}
PKGNAMESUFFIX= ${PYTHON_SUFFIX}
Expand All @@ -15,8 +15,8 @@ LICENSE= PSFL

LIB_DEPENDS= libffi.so:devel/libffi

USES= compiler:c11 cpe ncurses pathfix pkgconfig \
python:${PYTHON_DISTVERSION:R},env readline shebangfix ssl tar:xz trigger
USES= compiler:c11 cpe ncurses pathfix pkgconfig readline \
shebangfix ssl tar:xz
PATHFIX_MAKEFILEIN= Makefile.pre.in
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
Expand All @@ -25,7 +25,11 @@ SHEBANG_FILES= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
SHEBANG_FILES+= Lib/test/ziptestdata/exe_with_z64 \
Lib/test/ziptestdata/exe_with_zip \
Lib/test/ziptestdata/header.sh
TRIGGERS= ${PYTHON_VERSION}

# Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits.
PYTHON_VER= ${PYTHON_DISTVERSION:R}
PYTHON_VERSION= python${PYTHON_VER}
PYTHON_SUFFIX= ${PYTHON_VER:S/.//g}

DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm
CONFIGURE_ARGS+= --enable-shared --without-ensurepip \
Expand Down
40 changes: 0 additions & 40 deletions lang/python311/files/python3.11.ucl.in

This file was deleted.

11 changes: 7 additions & 4 deletions lang/python37/Makefile
@@ -1,6 +1,6 @@
PORTNAME= python
DISTVERSION= ${PYTHON_DISTVERSION}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= lang python
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION}
PKGNAMESUFFIX= ${PYTHON_SUFFIX}
Expand All @@ -19,14 +19,17 @@ EXPIRATION_DATE= 2023-06-27
LIB_DEPENDS= libffi.so:devel/libffi \
libmpdec.so:math/mpdecimal

USES= cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env readline \
shebangfix ssl tar:xz trigger
USES= cpe ncurses pathfix pkgconfig readline shebangfix ssl tar:xz
PATHFIX_MAKEFILEIN= Makefile.pre.in
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
python_CMD= ${PREFIX}/bin/python${PYTHON_DISTVERSION:R}
SHEBANG_FILES= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
TRIGGERS= ${PYTHON_VERSION}

# Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits.
PYTHON_VER= ${PYTHON_DISTVERSION:R}
PYTHON_VERSION= python${PYTHON_VER}
PYTHON_SUFFIX= ${PYTHON_VER:S/.//g}

DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm
CONFIGURE_ARGS+= --enable-shared --with-system-ffi --with-system-libmpdec --without-ensurepip
Expand Down
42 changes: 0 additions & 42 deletions lang/python37/files/python3.7.ucl.in

This file was deleted.

11 changes: 7 additions & 4 deletions lang/python38/Makefile
@@ -1,6 +1,6 @@
PORTNAME= python
DISTVERSION= ${PYTHON_DISTVERSION}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= lang python
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION}
PKGNAMESUFFIX= ${PYTHON_SUFFIX}
Expand All @@ -15,8 +15,7 @@ LICENSE= PSFL

LIB_DEPENDS= libffi.so:devel/libffi

USES= cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env readline \
shebangfix ssl tar:xz trigger
USES= cpe ncurses pathfix pkgconfig readline shebangfix ssl tar:xz
PATHFIX_MAKEFILEIN= Makefile.pre.in
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
Expand All @@ -25,7 +24,11 @@ SHEBANG_FILES= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
SHEBANG_FILES+= Lib/test/ziptestdata/exe_with_z64 \
Lib/test/ziptestdata/exe_with_zip \
Lib/test/ziptestdata/header.sh
TRIGGERS= ${PYTHON_VERSION}

# Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits.
PYTHON_VER= ${PYTHON_DISTVERSION:R}
PYTHON_VERSION= python${PYTHON_VER}
PYTHON_SUFFIX= ${PYTHON_VER:S/.//g}

DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm
CONFIGURE_ARGS+= --enable-shared --without-ensurepip \
Expand Down
42 changes: 0 additions & 42 deletions lang/python38/files/python3.8.ucl.in

This file was deleted.

0 comments on commit a9d9d3a

Please sign in to comment.