From 73634a898a0d9adfdb36df29ee261055e3582f8c Mon Sep 17 00:00:00 2001 From: Mike S Wang <32841762+MikeSWang@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:19:44 +0100 Subject: [PATCH] BUILD: Resort to namespace packaging for (pseudo-)data directories Refer to: - [setuptools docs](https://setuptools.pypa.io/en/latest/userguide/datafiles.html\#subdirectory-for-data-files) - [PEP-420](https://peps.python.org/pep-0420/) - [pypa/setuptools#3340](https://github.com/pypa/setuptools/issues/3340) --- MANIFEST.in | 1 - pyproject.toml | 15 +++++---------- setup.cfg | 8 +------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 9ae8ed8f..743d4e82 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -21,7 +21,6 @@ exclude .mailmap exclude .pre-commit-config.yaml exclude .readthedocs.yaml exclude README.md -exclude CONTRIBUTING.md exclude CITATION.md exclude CITATION.cff exclude NOTES.md diff --git a/pyproject.toml b/pyproject.toml index b72c8bde..ac74af3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,21 +57,16 @@ Documentation = "https://triumvirate.readthedocs.io/" Source = "https://github.com/MikeSWang/Triumvirate" Changelog = "https://github.com/MikeSWang/Triumvirate/blob/main/CHANGELOG.md" -[tool.setuptools] -include-package-data = true +# [tool.setuptools] +# include-package-data = true [tool.setuptools.dynamic] # version = {attr = 'triumvirate.__version__'} readme = {file = "README.rst"} -[tool.setuptools.packages.find] -where = ['src'] -namespaces = false -exclude = [ - 'triumvirate.include*', - 'triumvirate.src*', - 'triumvirate.resources*', -] +# [tool.setuptools.packages.find] +# where = ['src'] +# namespaces = true [tool.setuptools.package-data] 'triumvirate' = ["*.pxd", "*.pyx"] diff --git a/setup.cfg b/setup.cfg index c33ec359..f11affbe 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,7 @@ project_urls = Changelog = https://github.com/MikeSWang/Triumvirate/blob/main/CHANGELOG.md [options] -packages = find: +packages = find_namespace: package_dir= =src include_package_data = True @@ -57,10 +57,6 @@ nbk = [options.packages.find] where = src -exclude = - triumvirate.include* - triumvirate.src* - triumvirate.resources* [options.package_data] triumvirate = @@ -70,8 +66,6 @@ triumvirate.include = *.hpp triumvirate.src = *.cpp -triumvirate.src.modules = - *.cpp triumvirate.resources = *.ini *.yml