Skip to content

Commit

Permalink
rm _bufrlib(...).so before (re)building
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Nov 24, 2023
1 parent 055ab9e commit 672d7c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ add_dependencies(python_mod bufr_4)
add_custom_command(
TARGET python_mod
POST_BUILD
COMMAND ${Python3_EXECUTABLE} -m "numpy.f2py"
COMMAND ${CMAKE_COMMAND} -E rm "${CMAKE_CURRENT_BINARY_DIR}/_bufrlib.cpython.*.so"
)

add_custom_command(
TARGET python_mod
POST_BUILD
COMMAND ${Python3_EXECUTABLE} -m "numpy.f2py"
-c "${CMAKE_CURRENT_SOURCE_DIR}/_bufrlib.pyf"
-m _bufrlib
-L${CMAKE_BINARY_DIR}/src
Expand Down

0 comments on commit 672d7c1

Please sign in to comment.