Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use FindPython instead of deprecated FindPythonLibs #181

Merged
merged 1 commit into from
Jul 26, 2022
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
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