Skip to content

configure: do not look for python3 when python is disabled - #1514

Merged
carlocamilloni merged 1 commit into
plumed:masterfrom
huyang-md:fix-disable-python
Oct 17, 2026
Merged

carlocamilloni merged 1 commit into
plumed:masterfrom
huyang-md:fix-disable-python

Conversation

@huyang-md

Copy link
Copy Markdown
Contributor

Fixes #1422.

With --disable-python, configure still ran AC_CHECK_PROGS([PYTHON_BIN],[python3]), printing checking for python3... and then a spurious cannot enable python interface warning, even though no python support would be built.

Only search for python3 when the python interface is enabled. The resulting configuration is unchanged: without python support, PYTHON_BIN was already reset to empty at the end of the block (so python_bin in Makefile.conf is empty either way, and the python bindings build in src/lib/Makefile is guarded by ifdef python_bin).

Changes:

  • configure.ac: gate the AC_CHECK_PROGS call on test "$python" = true.
  • configure: the same edit applied to the generated script (as usual for this repository).

Verification:

  • Extracted the generated block and ran it in isolation: with python=false the search is skipped and PYTHON_BIN stays empty; with python=true the search still runs and finds python3 as before.
  • bash -n configure passes.
  • The resulting configuration is identical to the previous behaviour (PYTHON_BIN empty when python is disabled).

--disable-python still triggered the python3 search (printing
"checking for python3..." and a spurious "cannot enable python
interface" warning). Only search for python3 when the python interface
is actually enabled. The resulting configuration is unchanged: without
python support PYTHON_BIN was already reset to empty at the end of the
block.

Fixes plumed#1422
@huyang-md

Copy link
Copy Markdown
Contributor Author

The only failing check is linux (-intel-): it fails while linking with icpx: no such file or directory: /opt/intel/oneapi/compiler/2026.1/lib/libiomp5.so. This also fails on master since the v2.10 merge (run at 2026-10-16T19:53Z), so it looks like a oneAPI installation issue on the runner rather than something related to this change. All other checks are green.

@carlocamilloni
carlocamilloni merged commit c94b82d into plumed:master Oct 17, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--disable-python doesn't disable python bindings build: configure still looks for python3

2 participants