GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
758 stars 220 forks source link

Unnecessary files in the source distribution? #904

Closed seisman closed 3 years ago

seisman commented 3 years ago

Running python setup.py sdist will build a PyGMT source distribution in the dist directory (e.g., dist/pygmt-0.3.0.tar.gz.

The tarball contains the PyGMT source codes. Below is the list of top-level files and directories:

.codecov.yml
.github
.gitignore
.pylintrc
AUTHORS.md
AUTHORSHIP.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.txt
MAINTENANCE.md
MANIFEST.in
Makefile
PKG-INFO
README.rst
doc
environment.yml
examples
package.json
pygmt
pygmt.egg-info
pyproject.toml
requirements-dev.txt
requirements.txt
setup.cfg
setup.py
vercel.json

I'm not familiar with Python source distributions, but some files seem unnecessary (e.g., vercel.json, package.json, .github).

Reading the Python package guide, I thought most plaintext files won't be added into the source distribution, unless explicitly specified in the MANIFEST.in file. Perhaps my understanding is wrong.

weiji14 commented 3 years ago

Yeah we should fix this by the next release (v0.3.1). Not that we'll reach it anytime soon, but PyPI has a 10GB total project size limit, and a 100 MB project upload limit (i.e. per release/version).

image

seisman commented 3 years ago

So setuptools_scm includes all files in the source distribution by default.

See https://github.com/pypa/setuptools_scm#file-finders-hook-makes-most-of-manifestin-unnecessary and https://github.com/pypa/setuptools_scm/issues/516.

I think we need to explicitly exclude unnecessary files in the MANIFEST.in file.