File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -502,11 +502,18 @@ def check_npm(dist_dir, npm_install_options):
502502@use_checkout_dir ()
503503def 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 ()
You can’t perform that action at this time.
0 commit comments