Navigation Menu

Skip to content

Commit

Permalink
build: Revise MANIFEST.in strategy to properly use prune (#1449)
Browse files Browse the repository at this point in the history
* Remove global exclude of dotfiles from MANIFEST.in to avoid potential problems with build systems
   - c.f. scikit-build/scikit-build#537
* 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
* Include AUTHORS in MANIFEST.in
* Add list of sdist contents to package publishing CI
   - Allow for easier checking of the sdist contents in CI logs
  • Loading branch information
matthewfeickert committed May 13, 2021
1 parent 2c681a6 commit 6b769fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-package.yml
Expand Up @@ -63,6 +63,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/pyhf-*.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/pyhf'
Expand Down
12 changes: 9 additions & 3 deletions MANIFEST.in
@@ -1,6 +1,12 @@
prune *
prune **
graft src

include setup.py
include setup.cfg
include LICENSE
exclude lower-bound-requirements.txt
include README.rst
include pyproject.toml
include MANIFEST.in
include AUTHORS

global-exclude __pycache__ *.py[cod] .*
global-exclude __pycache__ *.py[cod]

0 comments on commit 6b769fd

Please sign in to comment.