Skip to content

Commit afbc83e

Browse files
committed
test: Fix execution of tests from source tree
* Require scikit-build >= 0.7.1 and use skbuild.constants to reference CMake binaries.
1 parent 33d8c98 commit afbc83e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cmake/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212

1313
# Support running tests from the source tree
1414
if not os.path.exists(CMAKE_DATA):
15+
from skbuild.constants import CMAKE_INSTALL_DIR as SKBUILD_CMAKE_INSTALL_DIR
1516
_cmake_data = os.path.abspath(os.path.join(
16-
os.path.dirname(__file__), '../_skbuild/cmake-install/cmake/data'))
17+
os.path.dirname(__file__), '..', SKBUILD_CMAKE_INSTALL_DIR, 'cmake/data'))
1718
if os.path.exists(_cmake_data):
1819
CMAKE_DATA = _cmake_data
1920

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ pytest>=3.0.3
55
pytest-cov>=2.4.0
66
pytest-runner>=2.9
77
pytest-virtualenv>=1.2.5
8-
scikit-build>=0.5.0
8+
scikit-build>=0.7.1
99
virtualenv>=15.0.3

0 commit comments

Comments
 (0)