Blob Blame History Raw
From 66c3c1b8349973abeef2165140f8920dfb790acb Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Mon, 13 May 2024 10:27:04 +0200
Subject: [PATCH] Exclude artifacts from sdist and wheel

Building the wheel from the PyPI sdist will include those files and
directories otherwise. They are also distributed in the uploaded wheel.
---
 pyproject.toml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/pyproject.toml b/pyproject.toml
index ab2fceb33..26bc07786 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -55,8 +55,20 @@ source = "vcs"
 # src/pynwb/__init__.py to set `__version__` (from _version.py).
 version-file = "src/pynwb/_version.py"
 
+[tool.hatch.build.targets.sdist]
+exclude = [
+    ".git*",
+    ".codespellrc",
+    ".readthedocs.yaml",
+]
+
 [tool.hatch.build.targets.wheel]
 packages = ["src/pynwb"]
+exclude = [
+    ".git*",
+    ".codespellrc",
+    ".readthedocs.yaml",
+]
 
 [tool.codespell]
 skip = "htmlcov,.git,.mypy_cache,.pytest_cache,.coverage,*.pdf,*.svg,venvs,.tox,nwb-schema,./docs/_build/*,*.ipynb"