Skip to content

Commit cb46519

Browse files
committed
build: migrate package to src layout
- Move package modules from pepsy/ to src/pepsy/ - Update setuptools package discovery to use src/ - Point Sphinx docs path insertion to src/ - Add tests/conftest.py to include src in local test runs - Validate editable install and test execution
1 parent b45e0f3 commit cb46519

12 files changed

Lines changed: 14 additions & 2 deletions

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sys
66

77
ROOT = Path(__file__).resolve().parents[1]
8-
sys.path.insert(0, str(ROOT))
8+
sys.path.insert(0, str(ROOT / "src"))
99

1010
# Avoid numba cache-path issues when importing quimb-dependent modules in docs builds.
1111
os.environ.setdefault("NUMBA_CACHE_DIR", "/tmp")

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ dev = ["pytest", "nbclient", "nbconvert"]
2727
[tool.setuptools]
2828
include-package-data = true
2929

30+
[tool.setuptools.package-dir]
31+
"" = "src"
32+
3033
[tool.setuptools.packages.find]
31-
where = ["."]
34+
where = ["src"]
3235
include = ["pepsy*"]
3336

3437
[tool.pytest.ini_options]
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)