Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix makefile f2py compatibility issues #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

orionlee
Copy link

@orionlee orionlee commented May 5, 2024

Provided 2 fixes for f2py issues in installation.

  1. Make FP defaulted to f2py (instead of f2py3.8, and can be optionally overridden by users with environment variable, e.g.,
$ FP=fp3.8 make

f2py3.8 is specific for Python 3.8 . Furthermore, in some environment, e.g., conda-based Linux, only f2py is provided.


  1. In f2py from numpy 1.26.4, it no longer accepts the command line arguments, and generates error.
$ make
f2py -c -m --quiet pyaneti src/constants.f90 src/todo.f90 src/qpower2.f90 src/quad.f90 src/ftr.f90 src/frv.f90 src/bayesian.f90 src/matrices.f90 src/kernels.f90 src/mcmc.f90 src/multi-gp-routines.f90   --fcompiler=gnu95  -llapack -lblas --compiler=unix 
usage: f2py [--dep DEPENDENCIES] [--backend {meson,distutils}] [-m MODULE_NAME]
f2py: error: argument -m: expected one argument
make: *** [makefile:41: pyaneti] Error 2

The second fix moves -m to be immediately before pyaneti, so that it is accepted by f2py in numpy 1.26.4, as well as older versions (tested in 1.26.0 and 1.23.5)

# location of -m is moved
f2py -c --quiet -m pyaneti src/constants.f90  ...

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.

1 participant