Skip to content

Commit a344813

Browse files
authored
Merge pull request #67 from roryyorke/rory/more-build-fixes
Build fixes: query numpy path directly; setup pyproject.toml for pip
2 parents 64c6df3 + 96e1876 commit a344813

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ endif()
3939
# base site dir, use python installation for location specific includes
4040
execute_process(
4141
COMMAND "${PYTHON_EXECUTABLE}" -c
42-
"from distutils.sysconfig import get_python_lib as pl; print(pl())"
42+
"import os,numpy; print(os.path.dirname(numpy.__path__[0]))"
4343
OUTPUT_VARIABLE PYTHON_SITE
4444
OUTPUT_STRIP_TRAILING_WHITESPACE)
4545
if(WIN32)

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ include README.rst
66
include MANIFEST.in
77
include setup.cfg.in
88
include CMakeLists.txt
9+
include pyproject.toml
910
include slycot/CMakeLists.txt
1011
include slycot/tests/CMakeLists.txt
1112
include slycot/*.py

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel", "scikit-build", "cmake", "numpy"]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def run(self):
221221

222222

223223
def setup_package():
224-
src_path = os.path.dirname(os.path.abspath(sys.argv[0]))
224+
src_path = os.path.dirname(os.path.abspath(__file__))
225225
sys.path.insert(0, src_path)
226226

227227
# Rewrite the version file everytime

0 commit comments

Comments
 (0)