Skip to content

Commit cfffc50

Browse files
FIX: Fix tests using the new entry point
1 parent 0b09c7e commit cfffc50

12 files changed

Lines changed: 14 additions & 14 deletions

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ upload_to_vcs_release = true
7171
match = "main"
7272

7373
[project.entry-points."cmake.module"]
74-
VTKSDKWheelPythonHelper = "vtk_sdk_python_wheel_helper.cmake"
74+
VTKSDKWheelPythonHelper = "vtk_sdk_python_wheel_helper"

tests/conftest.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def top_level_dir() -> Path:
1919

2020

2121
@pytest.fixture(scope="session")
22-
def buildenv(tmp_path_factory: pytest.TempPathFactory) -> VEnv:
22+
def buildenv(tmp_path_factory: pytest.TempPathFactory, top_level_dir: Path) -> VEnv:
2323
path = tmp_path_factory.mktemp("cmake_env")
2424
venv = VEnv(path)
2525
venv.install("cmake")
@@ -63,45 +63,46 @@ def wheelhouse(tmp_path_factory: pytest.TempPathFactory) -> Path:
6363

6464

6565
@pytest.fixture(scope="session")
66-
def vtksdk_helper(buildenv: VEnv, curdir: Path, top_level_dir: Path, dependency: str, wheelhouse: Path) -> None:
66+
def vtksdk_helper(buildenv: VEnv, top_level_dir: Path, wheelhouse: Path) -> None:
6767
buildenv.module(
6868
"pip", "wheel", top_level_dir.as_posix(),
69-
"--wheel-dir", wheelhouse.as_posix(),
69+
"--wheel-dir", wheelhouse.as_posix()
7070
)
71+
assert list(wheelhouse.glob("vtk_sdk_python_wheel_helper-*.whl"))
7172

7273

7374
@pytest.fixture(scope="session")
74-
def basic_project(buildenv: VEnv, curdir: Path, top_level_dir: Path, dependency: str, wheelhouse: Path) -> None:
75+
def basic_project(buildenv: VEnv, curdir: Path, vtksdk_helper, dependency: str, wheelhouse: Path) -> None:
7576
os.environ["Dependency_ROOT"] = dependency
7677

7778
basic_project_src = (curdir / "BasicProject").as_posix()
7879
buildenv.module(
7980
"pip", "wheel", basic_project_src,
8081
"--wheel-dir", wheelhouse.as_posix(),
81-
"--find-links", top_level_dir.as_posix(),
82+
"--find-links", wheelhouse.as_posix(),
8283
"--extra-index-url", "https://vtk.org/files/wheel-sdks",
83-
"--extra-index-url", "https://wheels.vtk.org",
84-
"-Clogging.level=DEBUG"
84+
"--extra-index-url", "https://wheels.vtk.org"
8585
)
86+
assert list(wheelhouse.glob("basic_project-*.whl"))
8687

8788

8889
@pytest.fixture(scope="session")
89-
def basic_project_sdk(buildenv: VEnv, curdir: Path, top_level_dir: Path, dependency: str, wheelhouse: Path) -> None:
90+
def basic_project_sdk(buildenv: VEnv, curdir: Path, vtksdk_helper, dependency: str, wheelhouse: Path) -> None:
9091
os.environ["Dependency_ROOT"] = dependency
9192

9293
basic_project_src = (curdir / "BasicProject" / "SDK").as_posix()
9394
buildenv.module(
9495
"pip", "wheel", basic_project_src,
9596
"--wheel-dir", wheelhouse.as_posix(),
96-
"--find-links", top_level_dir.as_posix(),
97+
"--find-links", wheelhouse.as_posix(),
9798
"--extra-index-url", "https://vtk.org/files/wheel-sdks",
98-
"--extra-index-url", "https://wheels.vtk.org",
99-
"-Clogging.level=DEBUG"
99+
"--extra-index-url", "https://wheels.vtk.org"
100100
)
101+
assert list(wheelhouse.glob("basic_project_sdk-*.whl"))
101102

102103

103104
# tmp virtualenv for the test projects
104105
@pytest.fixture()
105-
def virtualenv(tmp_path: Path) -> VEnv:
106+
def virtualenv(tmp_path: Path, top_level_dir: Path) -> VEnv:
106107
path = tmp_path / "venv"
107108
return VEnv(path)

tests/test_build_module.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ def test_build_module(virtualenv: VEnv, curdir: Path, top_level_dir: Path, wheel
1010
virtualenv.module(
1111
"pip", "install", test_src,
1212
"--find-links", wheelhouse.as_posix(),
13-
"--find-links", top_level_dir.as_posix(),
1413
"--extra-index-url", "https://vtk.org/files/wheel-sdks",
1514
"--extra-index-url", "https://wheels.vtk.org",
1615
"--verbose"
File renamed without changes.

vtk_sdk_python_wheel_helper/cmake/VTKSDKInstallRuntimeDeps.cmake renamed to vtk_sdk_python_wheel_helper/VTKSDKInstallRuntimeDeps.cmake

File renamed without changes.

vtk_sdk_python_wheel_helper/cmake/VTKSDKModuleBuilder.cmake renamed to vtk_sdk_python_wheel_helper/VTKSDKModuleBuilder.cmake

File renamed without changes.
File renamed without changes.

vtk_sdk_python_wheel_helper/cmake/VTKSDKPackageInit.cmake renamed to vtk_sdk_python_wheel_helper/VTKSDKPackageInit.cmake

File renamed without changes.

vtk_sdk_python_wheel_helper/cmake/VTKSDKPythonWheelHelper.cmake renamed to vtk_sdk_python_wheel_helper/VTKSDKPythonWheelHelper.cmake

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)