v4: Further fixes for f2py, macos, and spack#524
Open
mathomp4 wants to merge 1 commit intorelease/v4from
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed
f2pyexecutable lives in the
py-numpypackage'sbin/directory rather thanalongside the Python interpreter.
FindF2PY.cmakeandFindF2PY3.cmakenowask Python directly (
import numpy.f2py) to locate the correctf2pybinary. A two-pass search is used: the preferred locations (Python
bin/andnumpy-derived
bin/) are checked first withNO_DEFAULT_PATH, then a normalPATHsearch is used as a fallback to preserve behaviour on non-Spack(e.g. module-based) systems.
find_package(Python3)picking up a different Python 3 interpreter(e.g. a newer Homebrew Python) instead of the one already found by
find_package(Python)in Spack environments.esma_python.cmakenow pinsPython3_EXECUTABLEtoPython_EXECUTABLEwhenfind_package(Python)hasalready resolved a Python 3 interpreter, ensuring both find the same Python.
Changed
Python_FIND_VIRTUALENV FIRSTandPython3_FIND_VIRTUALENV FIRSTtoesma_python.cmakeso that an active Spackpython-venvonPATHispreferred over system or framework Pythons.