Needed for devel/meson-python to function on non-default Python flavours/distributions.
Details
- Reviewers
mandree jbeich - Group Reviewers
desktop portmgr - Commits
- R11:b883eac8e32d: devel/meson: enable FLAVORs
Need to figure out how to include python.mk variables, but not the dependencies, here, so meson-only consumers have the correct default FLAVOR specified.Existing consumers build as expected. Need to verify a couple specific cases of individual Python ports using this (and not meson-python) to build.
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 50298 Build 47190: arc lint + arc unit
Event Timeline
meson.mk: use entry point in dependency specifier, PKGNAME changes when not default FLAVOR
@jbeich wrote to the mailing lists:
Charlie Li <vishwin@FreeBSD.org> writes:
-BUILD_DEPENDS= meson>=0.63.3:devel/meson \
+BUILD_DEPENDS= meson:devel/meson@${PY_FLAVOR} \Looks non-deterministic as "meson" maybe provided by default flavor
instead of the requested (via FLAVOR + USES=python -> PY_FLAVOR) e.g.,$ pkg install meson $ make clean all FLAVOR=py310 BUILD_ALL_PYTHON_FLAVORS=y -C devel/meson-python [...] ===> Building for py310-meson-python-0.12.1 * Getting build dependencies for wheel... ERROR Missing dependencies: meson>=0.63.3 *** Error code 1+.if ${PYTHON_VER} != ${PYTHON_DEFAULT}
+PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX}
+.endifAvoiding USE_PYTHON=concurrent without hiding non-module files?
$ pkg install meson $ pkg install meson-py311 [...] Checking integrity... done (1 conflicting) - meson-py311-1.0.1 conflicts with meson-1.0.1 on /usr/local/bin/meson Checking integrity... done (0 conflicting) The following 4 package(s) will be affected (of 0 checked): Installed packages to be REMOVED: meson: 1.0.1 [...]
add USE_PYTHON=concurrent and remove polkit action, as it file conflicts and doesn't work properly here anyway
Note that python variables cannot be used in meson.mk, at all.
Doing it this way, when building meson-python on a non-default Python, fails because literally bin/meson is expected, not bin/meson-${PYTHON_VER}.
Don't even think about un-flavouring everything, near future consumers need to use this with all supported Python.
devel/meson-python: add BINARY_ALIAS
Gets around the "hardcoded" subcommand invocation.
devel/meson-python/Makefile | ||
---|---|---|
23 | Why not patch the source instead? BINARY_ALIAS has no impact on RUN_DEPENDS, so won't help devel/meson-python consumers. |
So the default-python based package can additionally install everything under plain names, or there can be another package that depends on the default python's and adds symlinks to the relevant entry points, commands, documentation, without all those 39 and -3.9 names.
devel/meson-python: patch out hardcoded meson invocations
Bump PORTREVISION for package change
This and consumers now execute the correct meson entry point.
Not tenable since meson-python has to operate under the same Python version/distribution, which is checked and enforced during the build process.
Looks incomplete. patch-setup.py was adjusting manpage location, obsoleted by 003a571d1d65. To fix polkit action may require either expanding USES=uniquefiles:dirs (implied by USE_PYTHON=concurrent) to handle the conflicting file/directory or adjusting ${TMPPLIST} from post-patch gated by PKGNAMESUFFIX.
$ pkg install meson $ pkg install meson-py311 [...] Checking integrity... done (1 conflicting) - meson-py311-1.0.1_1 conflicts with meson-1.0.1_1 on /usr/local/share/polkit-1/actions/com.mesonbuild.install.policy Checking integrity... done (0 conflicting) The following 4 package(s) will be affected (of 0 checked): Installed packages to be REMOVED: meson: 1.0.1_1 [...]
devel/meson-python/Makefile | ||
---|---|---|
40 | tests/ files are unused due to missing USE_PYTHON=pytest + TEST_DEPENDS=${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} |
The action itself is effectively a sudo make install wrapper for those who did not already temporarily elevate their privileges. The referenced paths, which are hardcoded as /usr, are wrong for us. Port builds don't use this at all.
devel/meson-python/Makefile | ||
---|---|---|
40 | I plan to hook this in a separate change. |