-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude test files from source/binary distributions #2956
Comments
Might be a case of pypa/setuptools#3260? We switched from setup.py to pyproject.toml in #1848 around Aug 2022, but most of the 'exclude' lines in MANIFEST.in was last modified in #999 around Mar 2021, and we might not have checked things properly. I tried for a bit with some settings, but couldn't figure out how to exclude those files... |
Yeah, I just tried downloading the sdist tar.gz files for PyGMT, and v0.4.1 (released 7 Aug 2021) was the last time when AUTHORSHIP.md was excluded. All the releases from v0.5.0 (released 29 Oct 2021) onwards to v0.10.0 contain AUTHORSHIP.md 😅 Might not be a setup.py/pyproject.toml thing, but some setuptools bug. |
It's likely that
|
Making following changes to diff --git a/MANIFEST.in b/MANIFEST.in
index 88e203e94..da8835b2c 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -3,12 +3,13 @@ prune .github*
prune ci
prune doc*
prune examples*
+prune pygmt/tests*
exclude .dvcignore
exclude .gitignore
exclude .readthedocs.yaml
exclude AUTHORSHIP.md
+exclude CODE_OF_CONDUCT.md
exclude CONTRIBUTING.md
exclude Makefile
exclude environment.yml
exclude requirements.txt
-exclude pygmt/tests/baseline/*.dvc Then the source tarball contains following files/directories:
The new source tarball is 178 KB, compared to 244 KB for the old source tarball. |
Likely related to https://github.com/pypa/setuptools/blob/85fd45b7d10441f006cbbdee2b718aa741db5246/NEWS.rst#breaking-changes-12. |
Ah nice, so need to add this to pyproject.toml: [tool.setuptools]
platforms = ["Any"]
include-package-data = true
+license-files = ["LICENSE.txt"] |
Running
make package
can create source and binary distributions. Here are the files/directories included in the source tarball:AUTHORSHIP.md
is excluded inMANIFEST.in
. Why is it still here?CODE_OF_CONDUCT.md
from the tarball?pygmt/tests
directory? The reasons are (1): tests are 536 KB and others are 900 KB. (2) Users can't run these tests due to the missing DVC files.The text was updated successfully, but these errors were encountered: