diff --git a/.gitignore b/.gitignore index 9743be3..216189a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,10 +10,10 @@ dist/ wheelhouse/ -pymmcore/pymmcore_swig_wrap.h -pymmcore/pymmcore_swig_wrap.cpp -pymmcore/_pymmcore_swig.cpython* -pymmcore/pymmcore_swig.py +src/pymmcore/pymmcore_swig_wrap.h +src/pymmcore/pymmcore_swig_wrap.cpp +src/pymmcore/_pymmcore_swig.* +src/pymmcore/pymmcore_swig.py pymmcore.egg-info .mypy_cache/ diff --git a/maintainer-notes.md b/maintainer-notes.md index a0b1f79..f5107e8 100644 --- a/maintainer-notes.md +++ b/maintainer-notes.md @@ -79,11 +79,11 @@ prefixed to the version: ```bash git checkout main -vim pymmcore/_version.py # Remove .dev0 +vim src/pymmcore/_version.py # Remove .dev0 git commit -a -m 'Version 1.2.3.42.4' git tag -a v1.2.3.42.4 -m Release -vim pymmcore/_version.py # Set version to 1.2.3.42.5.dev0 +vim src/pymmcore/_version.py # Set version to 1.2.3.42.5.dev0 git commit -a -m 'Version back to dev' git push upstream --follow-tags diff --git a/pyproject.toml b/pyproject.toml index c32d6f4..5bc331d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,12 +32,11 @@ dependencies = ["numpy >=1.12.0"] homepage = "https://micro-manager.org" repository = "https://github.com/micro-manager/pymmcore" - [tool.setuptools.dynamic] version = { attr = "pymmcore._version.__version__" } -[tool.setuptools.packages.find] -include = ["pymmcore*"] +[tool.setuptools.package-dir] +"" = "src" [tool.setuptools.package-data] "*" = ["py.typed", ".pyi"] diff --git a/setup.py b/setup.py index 5a288da..bb14b7f 100644 --- a/setup.py +++ b/setup.py @@ -101,7 +101,9 @@ def run(self): mmcore_extension = Extension( f"{PKG_NAME}._{SWIG_MOD_NAME}", - sources=mmcore_sources + [os.path.join(PKG_NAME, f"{SWIG_MOD_NAME}.i")], + sources=mmcore_sources + [os.path.join( + "src", PKG_NAME, f"{SWIG_MOD_NAME}.i", + )], swig_opts=[ "-c++", "-py3", diff --git a/pymmcore/__init__.py b/src/pymmcore/__init__.py similarity index 100% rename from pymmcore/__init__.py rename to src/pymmcore/__init__.py diff --git a/pymmcore/__init__.pyi b/src/pymmcore/__init__.pyi similarity index 100% rename from pymmcore/__init__.pyi rename to src/pymmcore/__init__.pyi diff --git a/pymmcore/_version.py b/src/pymmcore/_version.py similarity index 100% rename from pymmcore/_version.py rename to src/pymmcore/_version.py diff --git a/pymmcore/py.typed b/src/pymmcore/py.typed similarity index 100% rename from pymmcore/py.typed rename to src/pymmcore/py.typed diff --git a/pymmcore/pymmcore_swig.i b/src/pymmcore/pymmcore_swig.i similarity index 100% rename from pymmcore/pymmcore_swig.i rename to src/pymmcore/pymmcore_swig.i