Created attachment 210023 [details] patch bazel shouldn't depend on python at run-time.
@Yuri The "build," argument should be a suffix after the <version-spec>, not a prefix (though it may work?) per Mk/Uses/python.mk: Usage: USES=python[:version-spec][,arg,...] ^Triage: Reporter is committer, assign accordingly
This change proposal (after updating the patch per comment 1) is also: Approved by: portmgr (blanket: incorrect dependencies) MFH: 2019Q4 (blanket: bugfix)
devel/bazel029 appears to also need this change
Committed.
A commit references this bug: Author: yuri Date: Wed Dec 18 05:11:19 UTC 2019 New revision: 520361 URL: https://svnweb.freebsd.org/changeset/ports/520361 Log: devel/bazel, devel/bazel029: Remove python run-time dependency PR: 242695 Approved by: portmgr (blanket: incorrect dependencies) Changes: head/devel/bazel/Makefile head/devel/bazel029/Makefile
A bit of background on bazel's runtime dependency on python. As any build tool, bazel has to launch programs (compiler, etc) in a controlled way (setting up environment variables, redirecting stdout/stderr, etc). Historically, bazel used to do this set up in wrapper scripts written in Python (hence the runtime dependency). This is mostly cleaned up now, but a few exceptions remain. - All handling of Python uses a wrapper script written in Python, determining the version of python to be used, doing some set up, etc. That script itself is defensively written and should work with basically any Python interpreter. However it is launched from the java process directly. To do so, bazel embeds the the path of a Python interpreter it can rely on to be present at run time. - Some built-in functionality, like creating an archive[1] is implemented via built-in python Scripts that need to be launched by the described functionality. [1] https://github.com/bazelbuild/bazel/blob/db0e32ca6296e56e5314993fe9939bc7331768ec/tools/build_defs/pkg/build_tar.py
As mentioned, technically, there is still a run-time dependency on python, but it is probably not that important for most users. So, while I'm not happy with that removal, I can live with it. As it is committed already, we can just leave it as is, so I don't see anything further actionable from my side.
A commit references this bug: Author: yuri Date: Tue Dec 24 03:50:03 UTC 2019 New revision: 520771 URL: https://svnweb.freebsd.org/changeset/ports/520771 Log: devel/bazel and devel/bazel029: Add back python at run-time Maintainer requested to add it back because bazel needs python at run-time. PR: 242695 Requested by: aehlig@linta.de (maintainer) Changes: head/devel/bazel/Makefile head/devel/bazel029/Makefile