Skip to content

Commit 512c2e2

Browse files
committed
Tweak config for testing
1 parent a08e09f commit 512c2e2

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

build_config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@ def initialize(self, version, build_data):
2222
stream.write(
2323
"include(${CMAKE_CURRENT_LIST_DIR}/FindPytest.cmake)\n"
2424
)
25+
26+
# Always accept; actual version checks are handled by FindPytest.cmake
27+
config_path = (build_path / "PytestConfigVersion.cmake")
28+
with config_path.open("w", encoding="utf-8") as stream:
29+
stream.write(
30+
"set(PACKAGE_VERSION_COMPATIBLE TRUE)\n"
31+
"set(PACKAGE_VERSION_EXACT TRUE)\n"
32+
)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ path = "build_config.py"
4949

5050
[tool.hatch.build.targets.wheel.shared-data]
5151
"build/PytestConfig.cmake" = "share/Pytest/cmake/PytestConfig.cmake"
52+
"build/PytestConfigVersion.cmake" = "share/Pytest/cmake/PytestConfigVersion.cmake"
5253
"cmake/FindPytest.cmake" = "share/Pytest/cmake/FindPytest.cmake"
5354
"cmake/PytestAddTests.cmake" = "share/Pytest/cmake/PytestAddTests.cmake"
5455

0 commit comments

Comments
 (0)