Skip to content

Commit 2de58dd

Browse files
authored
Merge pull request #181 from bnavigator/findpython
Use FindPython instead of deprecated FindPythonLibs
2 parents 5a6858f + 7c45025 commit 2de58dd

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
# CMake file for use in conjunction with scikit-build
22

3-
cmake_minimum_required(VERSION 3.11.0)
3+
cmake_minimum_required(VERSION 3.14.0)
44

5-
if (CMAKE_VERSION VERSION_GREATER "3.11.99")
6-
cmake_policy(SET CMP0074 NEW)
7-
endif()
5+
cmake_policy(SET CMP0074 NEW)
86

97
project(slycot LANGUAGES NONE)
108

119
enable_language(C)
1210
enable_language(Fortran)
1311

14-
find_package(PythonLibs REQUIRED)
12+
find_package(Python COMPONENTS Interpreter Development NumPy REQUIRED)
1513
find_package(PythonExtensions REQUIRED)
1614
find_package(NumPy REQUIRED)
1715
find_package(F2PY REQUIRED)
1816
find_package(BLAS REQUIRED)
1917
find_package(LAPACK REQUIRED)
2018

21-
message(STATUS "NumPy included from: ${NumPy_INCLUDE_DIR}")
22-
message(STATUS "F2PY included from: ${F2PY_INCLUDE_DIR}")
19+
message(STATUS "Python headers included from: ${Python_INCLUDE_DIRS}")
20+
message(STATUS "NumPy headers included from: ${Python_NumPy_INCLUDE_DIRS}")
21+
message(STATUS "F2PY headers included from: ${F2PY_INCLUDE_DIRS}")
2322
message(STATUS "LAPACK: ${LAPACK_LIBRARIES}")
2423
message(STATUS "BLAS: ${BLAS_LIBRARIES}")
2524

conda-recipe/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ requirements:
1313
build:
1414
- {{ compiler('fortran') }} # [not win]
1515
- {{ compiler('c') }}
16-
- cmake
16+
- cmake >=3.14
1717
- make # [linux]
1818
- flang >=11 # [win]
1919

@@ -29,7 +29,7 @@ requirements:
2929
- python
3030
- numpy !=1.23.0
3131
- pip
32-
- scikit-build >=0.14.1
32+
- scikit-build >=0.15
3333
- setuptools >=45
3434
- setuptools_scm >=6.3
3535

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ requires = [
33
"setuptools>=45",
44
"setuptools_scm>=6.3",
55
"wheel",
6-
"scikit-build>=0.14.1",
7-
"cmake",
6+
"scikit-build>=0.15",
7+
"cmake>=3.14",
88
"numpy!=1.23.0"]
99
build-backend = "setuptools.build_meta"
1010

slycot/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,9 @@ target_link_libraries(${SLYCOT_MODULE}
664664

665665
target_include_directories(
666666
${SLYCOT_MODULE} PUBLIC
667+
${Python_INCLUDE_DIRS}
668+
${Python_NumPy_INCLUDE_DIRS}
667669
${F2PY_INCLUDE_DIRS}
668-
${PYTHON_INCLUDE_DIRS}
669670
)
670671

671672
if (UNIX)

0 commit comments

Comments
 (0)