From 4bd1ff81fd5afc993fed953110ef3f46d8b513cc Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 1 Mar 2023 18:14:34 -0600 Subject: [PATCH 1/2] build: Remove include of files always included by hatchling * From the hatchling docs > The following files are always included and cannot be excluded: > * /pyproject.toml > * /hatch.toml > * /hatch_build.py > * /.gitignore or /.hgignore > * Any defined readme file > * All defined license-files - c.f. https://hatch.pypa.io/latest/plugins/builder/sdist/#default-file-selection This apparently also includes AUTHORS under "license-files". * While there is no explicit need to remove these includes, doing so avoids potential confusion when browsing the contents of an sdist. - c.f. https://github.com/pypa/hatch/issues/ 766 --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 07336892d7..379d987429 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -137,10 +137,6 @@ version-file = "src/pyhf/_version.py" # c.f. https://github.com/pypa/hatch/pull/299 only-include = [ "/src", - "/LICENSE", - "/README.rst", - "/pyproject.toml", - "/AUTHORS", "/CITATION.cff" ] exclude = [ From af9c4d01632dfe7047efe5155cd16f3e0f71374d Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 1 Mar 2023 21:51:06 -0600 Subject: [PATCH 2/2] Add note to pyproject.toml --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 379d987429..2774aff549 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,6 +135,8 @@ version-file = "src/pyhf/_version.py" [tool.hatch.build.targets.sdist] # only-include needed to properly include src/pyhf/schemas # c.f. https://github.com/pypa/hatch/pull/299 +# hatchling always includes: +# pyproject.toml, .gitignore, any README, any LICENSE, AUTHORS only-include = [ "/src", "/CITATION.cff"