pytest-cmake 0.7.0__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pytest-cmake
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: Provide CMake module for Pytest
5
5
  Project-URL: Documentation, https://python-cmake.github.io/pytest-cmake
6
6
  Project-URL: Repository, https://github.com/python-cmake/pytest-cmake
@@ -100,6 +100,7 @@ if (Pytest_FOUND AND NOT TARGET Pytest::Pytest)
100
100
  set(_BUNDLE_TESTS $ENV{BUNDLE_PYTHON_TESTS})
101
101
  endif()
102
102
 
103
+ set(_include_file "${CMAKE_CURRENT_BINARY_DIR}/${NAME}_include.cmake")
103
104
  set(_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${NAME}_tests.cmake")
104
105
 
105
106
  add_custom_target(
@@ -120,9 +121,17 @@ if (Pytest_FOUND AND NOT TARGET Pytest::Pytest)
120
121
  -D "CTEST_FILE=${_tests_file}"
121
122
  -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/PytestAddTests.cmake")
122
123
 
124
+ file(WRITE "${_include_file}"
125
+ "if(EXISTS \"${_tests_file}\")\n"
126
+ " include(\"${_tests_file}\")\n"
127
+ "else()\n"
128
+ " add_test(${NAME}_NOT_BUILT ${NAME}_NOT_BUILT)\n"
129
+ "endif()\n"
130
+ )
131
+
123
132
  # Add discovered tests to directory TEST_INCLUDE_FILES
124
133
  set_property(DIRECTORY
125
- APPEND PROPERTY TEST_INCLUDE_FILES "${_tests_file}")
134
+ APPEND PROPERTY TEST_INCLUDE_FILES "${_include_file}")
126
135
 
127
136
  endfunction()
128
137
 
@@ -9,7 +9,7 @@ backend-path = ["."]
9
9
 
10
10
  [project]
11
11
  name = "pytest-cmake"
12
- version = "0.7.0"
12
+ version = "0.8.0"
13
13
  description = "Provide CMake module for Pytest"
14
14
  readme = "README.md"
15
15
  requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4"
@@ -60,7 +60,7 @@ class CreateCmakeConfig(install):
60
60
 
61
61
  setup(
62
62
  name="pytest-cmake",
63
- version="0.7.0",
63
+ version="0.8.0",
64
64
  data_files=[
65
65
  (
66
66
  "share/Pytest/cmake",
File without changes
File without changes
File without changes