Skip to content

Commit 0146419

Browse files
authored
Fix handling of check manifest (#392)
1 parent db21e02 commit 0146419

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

jupyter_releaser/cli.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -502,11 +502,18 @@ def check_npm(dist_dir, npm_install_options):
502502
@use_checkout_dir()
503503
def check_manifest():
504504
"""Check the project manifest"""
505-
# Only run the check if we have a manifest file.
506-
if util.MANIFEST.exists():
507-
util.run("check-manifest -v")
508-
else:
509-
util.log("Skipping check-manifest since there are no python package files")
505+
# Only run the check if are using setuptools as the backend
506+
if not util.PYPROJECT.exists() and util.SETUP_PY.exists():
507+
util.run("pipx run check-manifest -v")
508+
return
509+
510+
if util.PYPROJECT.exists():
511+
content = util.PYPROJECT.read_text("utf-8")
512+
if "setuptools.build_meta" in content:
513+
util.run("pipx run check-manifest -v")
514+
return
515+
516+
util.log("Skipping check-manifest")
510517

511518

512519
@main.command()

0 commit comments

Comments
 (0)