Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [3.74.0] - 2026-03-09

### Fixed

- More fixes for f2py and macOS in trying to fix ssl detection issues

## [3.73.0] - 2026-03-04

### Fixed
Expand Down
37 changes: 27 additions & 10 deletions python/f2py/UseF2Py.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,16 @@ macro (add_f2py_module _name)
# Tests on Calculon showed that the wrong libssl (from python)
# was being linked to This code tries to insert in the system SSL
# path. Might not always work but it seems to
if(NOT APPLE)
if(_lib STREQUAL "ssl")
find_package(OpenSSL REQUIRED)
if(OPENSSL_FOUND)
get_filename_component(OPENSSL_LIBRARY_DIR "${OPENSSL_SSL_LIBRARY}" DIRECTORY)
list(APPEND _lib_opts "-L${OPENSSL_LIBRARY_DIR}")
else()
message(FATAL_ERROR "SSL REQUIRED for but not found")
endif()
endif()
# NOTE: Originally guarded by NOT APPLE, but macOS with Meson backend
# also needs the explicit OpenSSL path (Baselibs does not ship libssl)
if(_lib STREQUAL "ssl")
find_package(OpenSSL REQUIRED)
if(OPENSSL_FOUND)
get_filename_component(OPENSSL_LIBRARY_DIR "${OPENSSL_SSL_LIBRARY}" DIRECTORY)
list(APPEND _lib_opts "-L${OPENSSL_LIBRARY_DIR}")
else()
message(FATAL_ERROR "SSL REQUIRED for but not found")
endif()
endif()

endforeach(_lib)
Expand Down Expand Up @@ -223,6 +223,23 @@ macro (add_f2py_module _name)
continue()
endif ()
endif ()

# f2py cannot handle XCode Frameworks (same as above)
if (_lib MATCHES "^.*framework$")
continue()
endif ()

# Ensure the OpenSSL lib dir is in the search path when ssl is listed
if(_lib STREQUAL "ssl")
find_package(OpenSSL REQUIRED)
if(OPENSSL_FOUND)
get_filename_component(OPENSSL_LIBRARY_DIR "${OPENSSL_SSL_LIBRARY}" DIRECTORY)
list(APPEND _lib_opts "-L${OPENSSL_LIBRARY_DIR}")
else()
message(FATAL_ERROR "SSL REQUIRED but not found")
endif()
endif()

list(APPEND _lib_opts "-l${_lib}")

endforeach()
Expand Down
37 changes: 27 additions & 10 deletions python/f2py3/UseF2Py3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,16 @@ macro (add_f2py3_module _name)
# Tests on Calculon showed that the wrong libssl (from python)
# was being linked to This code tries to insert in the system SSL
# path. Might not always work but it seems to
if(NOT APPLE)
if(_lib STREQUAL "ssl")
find_package(OpenSSL REQUIRED)
if(OPENSSL_FOUND)
get_filename_component(OPENSSL_LIBRARY_DIR "${OPENSSL_SSL_LIBRARY}" DIRECTORY)
list(APPEND _lib_opts "-L${OPENSSL_LIBRARY_DIR}")
else()
message(FATAL_ERROR "SSL REQUIRED for but not found")
endif()
endif()
# NOTE: Originally guarded by NOT APPLE, but macOS with Meson backend
# also needs the explicit OpenSSL path (Baselibs does not ship libssl)
if(_lib STREQUAL "ssl")
find_package(OpenSSL REQUIRED)
if(OPENSSL_FOUND)
get_filename_component(OPENSSL_LIBRARY_DIR "${OPENSSL_SSL_LIBRARY}" DIRECTORY)
list(APPEND _lib_opts "-L${OPENSSL_LIBRARY_DIR}")
else()
message(FATAL_ERROR "SSL REQUIRED for but not found")
endif()
endif()

endforeach(_lib)
Expand Down Expand Up @@ -223,6 +223,23 @@ macro (add_f2py3_module _name)
continue()
endif ()
endif ()

# f2py3 cannot handle XCode Frameworks (same as above)
if (_lib MATCHES "^.*framework$")
continue()
endif ()

# Ensure the OpenSSL lib dir is in the search path when ssl is listed
if(_lib STREQUAL "ssl")
find_package(OpenSSL REQUIRED)
if(OPENSSL_FOUND)
get_filename_component(OPENSSL_LIBRARY_DIR "${OPENSSL_SSL_LIBRARY}" DIRECTORY)
list(APPEND _lib_opts "-L${OPENSSL_LIBRARY_DIR}")
else()
message(FATAL_ERROR "SSL REQUIRED but not found")
endif()
endif()

list(APPEND _lib_opts "-l${_lib}")

endforeach()
Expand Down