Skip to content

Commit 19595b4

Browse files
committed
Switch to src-layout to fix test imports
The flat layout caused the source diffcp/ to shadow the installed package during testing, preventing _diffcp.so from being found. With src-layout, pytest runs against the installed package in site-packages which includes the compiled C++ extension.
1 parent 844f7d4 commit 19595b4

File tree

6 files changed

+2
-2
lines changed

6 files changed

+2
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232
pip install -v .[test]
3333
3434
- name: Run tests
35-
run: pytest $GITHUB_WORKSPACE/tests/ -v
36-
working-directory: /tmp
35+
run: pytest tests/ -v
3736

3837
build_wheels:
3938
name: Build wheels on ${{ matrix.os }}

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ test = [
3737

3838
[tool.scikit-build]
3939
wheel.expand-macos-universal-tags = true
40+
wheel.packages = ["src/diffcp"]
4041

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)