Skip to content

Commit

Permalink
build: Revise MANIFEST.in strategy to properly use prune (#95)
Browse files Browse the repository at this point in the history
* Use `prune **` to remove all files from the sdist
   - c.f. https://packaging.python.org/guides/using-manifest-in/#manifest-in-commands
   - "Setuptools also has undocumented support for ** matching zero or more characters including forward slash, backslash, and colon."
* Manually include all "default" files for a sdist in MANIFEST.in
   - c.f. https://packaging.python.org/guides/using-manifest-in/#how-files-are-included-in-an-sdist
* Add list of sdist contents to package publishing CI
   - Allow for easier checking of the sdist contents in CI logs
  • Loading branch information
matthewfeickert authored Jun 19, 2021
1 parent 0f8af18 commit 34c4b8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
echo "python-build named built distribution: ${wheel_name}"
- name: Verify the distribution
run: twine check dist/*
- name: List contents of sdist
run: tar --list --file dist/pylhe-*.tar.gz
- name: Publish distribution 📦 to Test PyPI
# every PR will trigger a push event on master, so check the push event is actually coming from master
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'scikit-hep/pylhe'
Expand Down
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
prune **
graft src

include setup.py
include setup.cfg
include LICENSE
include README.md
include pyproject.toml
include MANIFEST.in

global-exclude __pycache__ *.py[cod]

0 comments on commit 34c4b8c

Please sign in to comment.