After ports r480951 glib20 fails to package with DEFAULT_VERSIONS=python=3.7. It was fine before. =======================<phase: package >============================ ===> Building package for glib-2.56.1_1,1 pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/__init__.opt-1.cpython-37.pyc:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/codegen.opt-1.cpython-37.pyc:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/codegen_docbook.opt-1.cpython-37.pyc:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/codegen_main.opt-1.cpython-37.pyc:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/config.opt-1.cpython-37.pyc:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/dbustypes.opt-1.cpython-37.pyc:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/parser.opt-1.cpython-37.pyc:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/utils.opt-1.cpython-37.pyc:No such file or directory *** Error code 1
Same behaviour with DEFAULT_VERSIONS=python=3.6.
This port's plist conflicts with Mk/Uses/python.mk in how PYTHON_PYOEXTENSION is defined. Currently, for the cases of Python 3.5 and later (which this bug applies to), PYTHON_PYOEXTENSION is just opt-1.pyc. But in this plist, the opt-1 part comes before the .cpython-%%PYTHON_SUFFIX%%.pyc, with the ending becoming opt-1.cpython-%%PYTHON_SUFFIX%%.pyc, which results in this build failure when python>=3.5. CCing python@ for more input.
(In reply to Charlie Li from comment #2) The offending line seems to be https://svnweb.freebsd.org/ports/head/Mk/Uses/python.mk?view=markup#l621 The .cpython-%%PYTHON_SUFFIX%% bit is placed between opt-1 and .pyc (resulting in opt1-cpython-%%PYTHON_SUFFIX%%.pyc), where instead should be before opt-1.pyc. The stage process for this port results in the correct locations and filenames, but the script that converts PYTHON_PYOEXTENSION for python >= 3.5 needs fixing. Unfortunately, my awk-fu is nearly nonexistent so it may take a while for me to prepare a patch (if it ends up being the case).
Looks like antoine@ fixed the plist. This can probably be closed now.
See: ports r480998