Skip to content

Commit

Permalink
Require f2py executable for python cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Nov 13, 2023
1 parent 70914f3 commit f4a5e3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# Rahul Mahajan

find_program(F2PY_EXECUTABLE REQUIRED NAMES f2py)

configure_file(setup.py.in setup.py @ONLY)

file( COPY ncepbufr utils _bufrlib.pyf DESTINATION . )
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class f2py_Build(build_ext):
self.build_extension(ext)

def build_extension(self, ext):
os.system(f"f2py -c {ext.name}.pyf -m {ext.name}")
os.system(f"@F2PY_EXECUTABLE@ -c {ext.name}.pyf -m {ext.name}")

add_attribute = lambda **args: [list.append(attdict[key], value)
for key, value in args.items()]
Expand Down

0 comments on commit f4a5e3a

Please sign in to comment.