Skip to content
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

fix: produce working SDists, check in CI #893

Merged
merged 1 commit into from Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Expand Up @@ -22,6 +22,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.3
- run: pipx run nox -s check_manifest

test:
name: Test cibuildwheel on ${{ matrix.os }}
Expand Down
6 changes: 6 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,6 @@
recursive-include cibuildwheel *.cfg
recursive-include cibuildwheel *.in
recursive-include cibuildwheel *.py
recursive-include cibuildwheel *.toml
recursive-include cibuildwheel *.txt
recursive-include cibuildwheel *.typed
Comment on lines +1 to +6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also could be written this way

Suggested change
recursive-include cibuildwheel *.cfg
recursive-include cibuildwheel *.in
recursive-include cibuildwheel *.py
recursive-include cibuildwheel *.toml
recursive-include cibuildwheel *.txt
recursive-include cibuildwheel *.typed
recursive-include cibuildwheel *.cfg *.in *.py *.toml *.txt *.typed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either way seems fine to me, I'm more familiar with the multi-line version so maybe let's go with that

12 changes: 11 additions & 1 deletion noxfile.py
Expand Up @@ -4,7 +4,7 @@

import nox

nox.options.sessions = ["lint", "tests"]
nox.options.sessions = ["lint", "check_manifest", "tests"]

PYTHON_ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]

Expand Down Expand Up @@ -34,6 +34,16 @@ def lint(session: nox.Session) -> None:
session.run("pre-commit", "run", "--all-files", *session.posargs)


@nox.session
def check_manifest(session: nox.Session) -> None:
"""
Ensure all needed files are included in the manifest.
"""

session.install("check-manifest")
session.run("check-manifest", *session.posargs)


@nox.session(python=PYTHON_ALL_VERSIONS)
def update_constraints(session: nox.Session) -> None:
"""
Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Expand Up @@ -67,3 +67,18 @@ ignore_missing_imports = true

[tool.pycln]
all = true

[tool.check-manifest]
ignore = [
".*",
".circleci/**",
"test/**",
"unit_test/**",
"docs/**",
"examples/**",
"bin/**",
"*.yml",
"CI.md", # TODO: can change test/test_ssl and remove this
"requirements-dev.txt",
"noxfile.py",
]