Skip to content
Open
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
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ jobs:
set -ex
sudo apt-get update
sudo apt-get install -y python3-numpy cython3 python3-pytest
sudo ln -s /usr/bin/cython3 /usr/bin/cython
sudo ln -s /usr/bin/pytest-3 /usr/bin/pytest

- name: Build dftatom cmake python
run: |
Expand Down
4 changes: 3 additions & 1 deletion cmake/FindNumPy.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
find_package(Python3 REQUIRED COMPONENTS Interpreter)

execute_process(
COMMAND python -c "import numpy; print(numpy.get_include())"
COMMAND ${Python3_EXECUTABLE} -c "import numpy; print(numpy.get_include())"
OUTPUT_VARIABLE PYTHON_SYS_PATH
)
string(STRIP ${PYTHON_SYS_PATH} PYTHON_SYS_PATH)
Expand Down
10 changes: 6 additions & 4 deletions cmake/FindPython.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
find_package(Python3 REQUIRED COMPONENTS Interpreter)

execute_process(
COMMAND python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())"
COMMAND ${Python3_EXECUTABLE} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())"
OUTPUT_VARIABLE PYTHON_SYS_PATH
)
string(STRIP ${PYTHON_SYS_PATH} PYTHON_SYS_PATH)
Expand All @@ -10,13 +12,13 @@ FIND_PATH(PYTHON_INCLUDE_PATH Python.h
)

execute_process(
COMMAND python -c "from distutils.sysconfig import get_config_var; print(get_config_var('LIBDIR'))"
COMMAND ${Python3_EXECUTABLE} -c "from distutils.sysconfig import get_config_var; print(get_config_var('LIBDIR'))"
OUTPUT_VARIABLE PYTHON_LIB_PATH
)
string(STRIP ${PYTHON_LIB_PATH} PYTHON_LIB_PATH)

execute_process(
COMMAND python -c "import sys; print('%s.%s' % sys.version_info[:2])"
COMMAND ${Python3_EXECUTABLE} -c "import sys; print('%s.%s' % sys.version_info[:2])"
OUTPUT_VARIABLE PYTHON_VERSION
)
string(STRIP ${PYTHON_VERSION} PYTHON_VERSION)
Expand All @@ -29,7 +31,7 @@ FIND_LIBRARY(PYTHON_LIBRARY NAMES python${PYTHON_VERSION}
)

execute_process(
COMMAND python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
COMMAND ${Python3_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
OUTPUT_VARIABLE PYTHON_INSTALL_PATH_tmp
)
string(STRIP ${PYTHON_INSTALL_PATH_tmp} PYTHON_INSTALL_PATH_tmp)
Expand Down
Loading