simplify switching default Python versions, ok kmos@
Add a new SUBST_VARS variable that is set to "@comment " on most Python versions, but is set to "" on the default one. This makes it easier to swap between default versions because you don't need to figure out which @comments should be kept and which should be moved. While there I remove some existing lines with @comment markers for files that are not created by any of our current Python ports: @comment bin/pyvenv @comment lib/libpython3.8m.so (etc) The @comment -> ${PY_DEFAULTONLY} change doesn't affect the generated PLISTs at all, so for that a REVISION bump is unnecessary, but removing the pyvenv/libpython3.Xm.so does require a bump
This commit is contained in:
parent
a91a872327
commit
bc96ab094e
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2021/11/01 14:16:09 kmos Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2021/11/01 16:56:25 sthen Exp $
|
||||
|
||||
# IMPORTANT! If you make any changes to the Python ports, be sure
|
||||
# to also update files/CHANGES.OpenBSD for your change. This is a
|
||||
@ -11,6 +11,8 @@ SHARED_LIBS = python3.10 0.0
|
||||
VERSION_SPEC = >=3.10,<3.11
|
||||
#PSUBDIR = python/3.10.0
|
||||
|
||||
REVISION-main = 0
|
||||
|
||||
|
||||
CONFIGURE_ARGS += --with-ensurepip=no
|
||||
CONFIGURE_ARGS += --enable-loadable-sqlite-extensions
|
||||
|
@ -1,8 +1,8 @@
|
||||
@comment $OpenBSD: PLIST-idle,v 1.1.1.1 2021/11/01 14:16:09 kmos Exp $
|
||||
@comment $OpenBSD: PLIST-idle,v 1.2 2021/11/01 16:56:25 sthen Exp $
|
||||
@option no-default-conflict
|
||||
@option is-branch
|
||||
@conflict python-idle-${VERSION_SPEC}
|
||||
@comment bin/idle3
|
||||
${PY_DEFAULTONLY}bin/idle3
|
||||
bin/idle3.10
|
||||
lib/python3.10/idlelib/
|
||||
lib/python3.10/idlelib/CREDITS.txt
|
||||
|
@ -1,17 +1,15 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2021/11/01 14:16:11 kmos Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.2 2021/11/01 16:56:25 sthen Exp $
|
||||
@option no-default-conflict
|
||||
@option is-branch
|
||||
@conflict python-${VERSION_SPEC}
|
||||
@comment bin/2to3
|
||||
${PY_DEFAULTONLY}bin/2to3
|
||||
bin/2to3-3.10
|
||||
@comment bin/pydoc3
|
||||
${PY_DEFAULTONLY}bin/pydoc3
|
||||
bin/pydoc3.10
|
||||
@comment bin/python3
|
||||
@comment bin/python3-config
|
||||
${PY_DEFAULTONLY}bin/python3
|
||||
${PY_DEFAULTONLY}bin/python3-config
|
||||
@bin bin/python3.10
|
||||
bin/python3.10-config
|
||||
@comment bin/pyvenv
|
||||
@comment lib/libpython3.10m.so
|
||||
include/python3.10/
|
||||
include/python3.10/Python.h
|
||||
include/python3.10/abstract.h
|
||||
@ -182,8 +180,8 @@ include/python3.10/weakrefobject.h
|
||||
@comment lib/libpython3.so
|
||||
lib/pkgconfig/python-3.10-embed.pc
|
||||
lib/pkgconfig/python-3.10.pc
|
||||
@comment lib/pkgconfig/python3-embed.pc
|
||||
@comment lib/pkgconfig/python3.pc
|
||||
${PY_DEFAULTONLY}lib/pkgconfig/python3-embed.pc
|
||||
${PY_DEFAULTONLY}lib/pkgconfig/python3.pc
|
||||
lib/python3.10/
|
||||
lib/python3.10/LICENSE.txt
|
||||
lib/python3.10/__future__.py
|
||||
@ -2871,7 +2869,7 @@ lib/python3.10/zoneinfo/__pycache__/_zoneinfo.cpython-310.pyc
|
||||
lib/python3.10/zoneinfo/_common.py
|
||||
lib/python3.10/zoneinfo/_tzpath.py
|
||||
lib/python3.10/zoneinfo/_zoneinfo.py
|
||||
@comment @man man/man1/python3.1
|
||||
${PY_DEFAULTONLY}@man man/man1/python3.1
|
||||
@man man/man1/python3.10.1
|
||||
share/doc/python3.10/
|
||||
share/doc/python3.10/CHANGES.OpenBSD
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.20 2021/11/01 07:43:39 landry Exp $
|
||||
# $OpenBSD: Makefile,v 1.21 2021/11/01 16:56:25 sthen Exp $
|
||||
|
||||
# IMPORTANT! If you make any changes to the Python ports, be sure
|
||||
# to also update files/CHANGES.OpenBSD for your change. This is a
|
||||
@ -10,7 +10,11 @@ PATCHLEVEL = .12
|
||||
SHARED_LIBS = python3.8 0.0
|
||||
VERSION_SPEC = >=3.8,<3.9
|
||||
|
||||
REVISION-main = 1
|
||||
REVISION-main = 2
|
||||
|
||||
# override "@comment" setting for the MODPY_DEFAULT_VERSION_3 version
|
||||
PY_DEFAULTONLY =
|
||||
|
||||
|
||||
CONFIGURE_ARGS += --with-ensurepip=no
|
||||
CONFIGURE_ARGS += --enable-loadable-sqlite-extensions
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST-idle,v 1.7 2021/02/21 19:24:26 daniel Exp $
|
||||
@comment $OpenBSD: PLIST-idle,v 1.8 2021/11/01 16:56:25 sthen Exp $
|
||||
@option no-default-conflict
|
||||
@option is-branch
|
||||
@conflict python-idle-${VERSION_SPEC}
|
||||
@ -10,7 +10,7 @@
|
||||
@pkgpath lang/python/3.5,-idle
|
||||
@pkgpath lang/python/3.6,-idle
|
||||
@pkgpath lang/python/3.7,-idle
|
||||
bin/idle3
|
||||
${PY_DEFAULTONLY}bin/idle3
|
||||
bin/idle3.8
|
||||
lib/python3.8/idlelib/
|
||||
lib/python3.8/idlelib/CREDITS.txt
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.19 2021/09/01 17:41:48 kmos Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.20 2021/11/01 16:56:25 sthen Exp $
|
||||
@option no-default-conflict
|
||||
@option is-branch
|
||||
@conflict python-${VERSION_SPEC}
|
||||
@ -9,16 +9,14 @@
|
||||
@pkgpath lang/python/3.5,-main
|
||||
@pkgpath lang/python/3.6,-main
|
||||
@pkgpath lang/python/3.7,-main
|
||||
bin/2to3
|
||||
${PY_DEFAULTONLY}bin/2to3
|
||||
bin/2to3-3.8
|
||||
bin/pydoc3
|
||||
${PY_DEFAULTONLY}bin/pydoc3
|
||||
bin/pydoc3.8
|
||||
bin/python3
|
||||
bin/python3-config
|
||||
${PY_DEFAULTONLY}bin/python3
|
||||
${PY_DEFAULTONLY}bin/python3-config
|
||||
@bin bin/python3.8
|
||||
bin/python3.8-config
|
||||
@comment bin/pyvenv
|
||||
@comment lib/libpython3.8m.so
|
||||
include/python3.8/
|
||||
include/python3.8/Python-ast.h
|
||||
include/python3.8/Python.h
|
||||
@ -161,8 +159,8 @@ include/python3.8/weakrefobject.h
|
||||
@comment lib/libpython3.so
|
||||
lib/pkgconfig/python-3.8-embed.pc
|
||||
lib/pkgconfig/python-3.8.pc
|
||||
lib/pkgconfig/python3-embed.pc
|
||||
lib/pkgconfig/python3.pc
|
||||
${PY_DEFAULTONLY}lib/pkgconfig/python3-embed.pc
|
||||
${PY_DEFAULTONLY}lib/pkgconfig/python3.pc
|
||||
lib/python3.8/
|
||||
lib/python3.8/LICENSE.txt
|
||||
lib/python3.8/__future__.py
|
||||
@ -2784,7 +2782,7 @@ lib/python3.8/xmlrpc/server.py
|
||||
lib/python3.8/zipapp.py
|
||||
lib/python3.8/zipfile.py
|
||||
lib/python3.8/zipimport.py
|
||||
@man man/man1/python3.1
|
||||
${PY_DEFAULTONLY}@man man/man1/python3.1
|
||||
@man man/man1/python3.8.1
|
||||
share/doc/python3.8/
|
||||
share/doc/python3.8/CHANGES.OpenBSD
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.11 2021/11/01 07:43:39 landry Exp $
|
||||
# $OpenBSD: Makefile,v 1.12 2021/11/01 16:56:25 sthen Exp $
|
||||
|
||||
# IMPORTANT! If you make any changes to the Python ports, be sure
|
||||
# to also update files/CHANGES.OpenBSD for your change. This is a
|
||||
@ -11,7 +11,7 @@ SHARED_LIBS = python3.9 0.0
|
||||
VERSION_SPEC = >=3.9,<3.10
|
||||
#PSUBDIR = python/3.9.0
|
||||
|
||||
REVISION-main = 1
|
||||
REVISION-main = 2
|
||||
|
||||
|
||||
CONFIGURE_ARGS += --with-ensurepip=no
|
||||
|
@ -1,8 +1,8 @@
|
||||
@comment $OpenBSD: PLIST-idle,v 1.2 2021/02/21 19:23:21 daniel Exp $
|
||||
@comment $OpenBSD: PLIST-idle,v 1.3 2021/11/01 16:56:25 sthen Exp $
|
||||
@option no-default-conflict
|
||||
@option is-branch
|
||||
@conflict python-idle-${VERSION_SPEC}
|
||||
@comment bin/idle3
|
||||
${PY_DEFAULTONLY}bin/idle3
|
||||
bin/idle3.9
|
||||
lib/python3.9/idlelib/
|
||||
lib/python3.9/idlelib/CREDITS.txt
|
||||
|
@ -1,17 +1,15 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.9 2021/09/01 17:41:48 kmos Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.10 2021/11/01 16:56:25 sthen Exp $
|
||||
@option no-default-conflict
|
||||
@option is-branch
|
||||
@conflict python-${VERSION_SPEC}
|
||||
@comment bin/2to3
|
||||
${PY_DEFAULTONLY}bin/2to3
|
||||
bin/2to3-3.9
|
||||
@comment bin/pydoc3
|
||||
${PY_DEFAULTONLY}bin/pydoc3
|
||||
bin/pydoc3.9
|
||||
@comment bin/python3
|
||||
@comment bin/python3-config
|
||||
${PY_DEFAULTONLY}bin/python3
|
||||
${PY_DEFAULTONLY}bin/python3-config
|
||||
@bin bin/python3.9
|
||||
bin/python3.9-config
|
||||
@comment bin/pyvenv
|
||||
@comment lib/libpython3.9m.so
|
||||
include/python3.9/
|
||||
include/python3.9/Python-ast.h
|
||||
include/python3.9/Python.h
|
||||
@ -176,8 +174,8 @@ include/python3.9/weakrefobject.h
|
||||
@comment lib/libpython3.so
|
||||
lib/pkgconfig/python-3.9-embed.pc
|
||||
lib/pkgconfig/python-3.9.pc
|
||||
@comment lib/pkgconfig/python3-embed.pc
|
||||
@comment lib/pkgconfig/python3.pc
|
||||
${PY_DEFAULTONLY}lib/pkgconfig/python3-embed.pc
|
||||
${PY_DEFAULTONLY}lib/pkgconfig/python3.pc
|
||||
lib/python3.9/
|
||||
lib/python3.9/LICENSE.txt
|
||||
lib/python3.9/__future__.py
|
||||
@ -2836,7 +2834,7 @@ lib/python3.9/zoneinfo/__pycache__/_zoneinfo.cpython-39.pyc
|
||||
lib/python3.9/zoneinfo/_common.py
|
||||
lib/python3.9/zoneinfo/_tzpath.py
|
||||
lib/python3.9/zoneinfo/_zoneinfo.py
|
||||
@comment @man man/man1/python3.1
|
||||
${PY_DEFAULTONLY}@man man/man1/python3.1
|
||||
@man man/man1/python3.9.1
|
||||
share/doc/python3.9/
|
||||
share/doc/python3.9/CHANGES.OpenBSD
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.140 2021/11/01 07:43:39 landry Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.141 2021/11/01 16:56:24 sthen Exp $
|
||||
|
||||
# IMPORTANT! If you make any changes to the Python ports, be sure
|
||||
# to also update files/CHANGES.OpenBSD for your change. This is a
|
||||
@ -124,8 +124,12 @@ MAKE_FLAGS += LD_LIBRARY_PATH=${WRKSRC} PATH="${WRKDIST}:${PORTPATH}"
|
||||
MAKE_FLAGS += CFLAGS_NODIST='-I${LOCALBASE}/include' LDFLAGS_NODIST='-L${WRKSRC} -L${LOCALBASE}/lib/'
|
||||
FAKE_FLAGS += RANLIB=:
|
||||
|
||||
# Used in PLISTs for files which should not be installed for non-default
|
||||
# versions of Python (i.e. /usr/local/bin/python3).
|
||||
PY_DEFAULTONLY ?= "@comment "
|
||||
|
||||
PY_PLATFORM = openbsd${OSMAJOR}
|
||||
SUBST_VARS += VERSION_SPEC PY_PLATFORM
|
||||
SUBST_VARS += VERSION_SPEC PY_PLATFORM PY_DEFAULTONLY
|
||||
|
||||
# Python itself is clean, but some extensions e.g. py-cryptography
|
||||
# and QtWebKit require W|X mappings.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: python.port.mk,v 1.134 2021/11/01 14:17:16 kmos Exp $
|
||||
# $OpenBSD: python.port.mk,v 1.135 2021/11/01 16:56:24 sthen Exp $
|
||||
#
|
||||
# python.port.mk - Xavier Santolaria <xavier@santolaria.net>
|
||||
# This file is in the public domain.
|
||||
@ -9,11 +9,8 @@ CATEGORIES += lang/python
|
||||
MODPY_DEFAULT_VERSION_2 = 2.7
|
||||
MODPY_DEFAULT_VERSION_3 = 3.8
|
||||
|
||||
# If switching to a new MODPY_DEFAULT_VERSION_3:
|
||||
# - In the old default version, @comment the non-suffixed bin/XXX files (python3,
|
||||
# pydoc3, idle3, etc), lib/pkgconfig/python3.pc, and man/man1/python3.1 and
|
||||
# bump REVISION
|
||||
# - In the new version, un-@comment these same files
|
||||
# If switching to a new MODPY_DEFAULT_VERSION_3, say 3.x to 3.y:
|
||||
# - Move PY_DEFAULTONLY from 3.x/Makefile to 3.y/Makefile
|
||||
# - In the new version, @conflict on the old REVISION of the old version
|
||||
# (3.6.8p1 was "default py3 is py3.6", 3.6.8p2 was after the switch to "default
|
||||
# is py3.7", so the 3.7 ports had @conflict python-subpkg-<3.6.8p2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user