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 handling of check manifest #392

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions jupyter_releaser/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,18 @@ def check_npm(dist_dir, npm_install_options):
@use_checkout_dir()
def check_manifest():
"""Check the project manifest"""
# Only run the check if we have a manifest file.
if util.MANIFEST.exists():
util.run("check-manifest -v")
else:
util.log("Skipping check-manifest since there are no python package files")
# Only run the check if are using setuptools as the backend
if not util.PYPROJECT.exists() and util.SETUP_PY.exists():
util.run("pipx run check-manifest -v")
return

if util.PYPROJECT.exists():
content = util.PYPROJECT.read_text("utf-8")
if "setuptools.build_meta" in content:
util.run("pipx run check-manifest -v")
return

util.log("Skipping check-manifest")


@main.command()
Expand Down