Skip to content

Commit

Permalink
Use FindPython instead of deprecated FindPythonLibs
Browse files Browse the repository at this point in the history
  • Loading branch information
bnavigator committed Jul 26, 2022
1 parent 5a6858f commit 7c45025
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# CMake file for use in conjunction with scikit-build

cmake_minimum_required(VERSION 3.11.0)
cmake_minimum_required(VERSION 3.14.0)

if (CMAKE_VERSION VERSION_GREATER "3.11.99")
cmake_policy(SET CMP0074 NEW)
endif()
cmake_policy(SET CMP0074 NEW)

project(slycot LANGUAGES NONE)

enable_language(C)
enable_language(Fortran)

find_package(PythonLibs REQUIRED)
find_package(Python COMPONENTS Interpreter Development NumPy REQUIRED)
find_package(PythonExtensions REQUIRED)
find_package(NumPy REQUIRED)
find_package(F2PY REQUIRED)
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)

message(STATUS "NumPy included from: ${NumPy_INCLUDE_DIR}")
message(STATUS "F2PY included from: ${F2PY_INCLUDE_DIR}")
message(STATUS "Python headers included from: ${Python_INCLUDE_DIRS}")
message(STATUS "NumPy headers included from: ${Python_NumPy_INCLUDE_DIRS}")
message(STATUS "F2PY headers included from: ${F2PY_INCLUDE_DIRS}")
message(STATUS "LAPACK: ${LAPACK_LIBRARIES}")
message(STATUS "BLAS: ${BLAS_LIBRARIES}")

Expand Down
4 changes: 2 additions & 2 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ requirements:
build:
- {{ compiler('fortran') }} # [not win]
- {{ compiler('c') }}
- cmake
- cmake >=3.14
- make # [linux]
- flang >=11 # [win]

Expand All @@ -29,7 +29,7 @@ requirements:
- python
- numpy !=1.23.0
- pip
- scikit-build >=0.14.1
- scikit-build >=0.15
- setuptools >=45
- setuptools_scm >=6.3

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ requires = [
"setuptools>=45",
"setuptools_scm>=6.3",
"wheel",
"scikit-build>=0.14.1",
"cmake",
"scikit-build>=0.15",
"cmake>=3.14",
"numpy!=1.23.0"]
build-backend = "setuptools.build_meta"

Expand Down
3 changes: 2 additions & 1 deletion slycot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,9 @@ target_link_libraries(${SLYCOT_MODULE}

target_include_directories(
${SLYCOT_MODULE} PUBLIC
${Python_INCLUDE_DIRS}
${Python_NumPy_INCLUDE_DIRS}
${F2PY_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
)

if (UNIX)
Expand Down

0 comments on commit 7c45025

Please sign in to comment.