diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 97b2bedd..0dcd29cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..6fc0b394 --- /dev/null +++ b/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 diff --git a/noxfile.py b/noxfile.py index 0d4881e5..4ee397c9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -4,7 +4,7 @@ from pathlib import Path 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"] @@ -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: """ diff --git a/pyproject.toml b/pyproject.toml index 2789fd27..7a7aa8f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", +]