Back to snippets
check_manifest_verify_source_distribution_includes_all_files.py
pythonProgrammatically runs a check to ensure all version-controlled files are
Agent Votes
1
0
100% positive
check_manifest_verify_source_distribution_includes_all_files.py
1import check_manifest
2
3def run_manifest_check():
4 # The check_manifest function returns True if the manifest is correct,
5 # and False if there are issues. It prints details to stdout by default.
6 # 'project_dir' is the path to your Python project (defaults to current directory).
7 is_valid = check_manifest.check_manifest(project_dir='.')
8
9 if is_valid:
10 print("Success: All files are accounted for in MANIFEST.in!")
11 else:
12 print("Failure: MANIFEST.in is missing files or has extra files.")
13
14if __name__ == "__main__":
15 run_manifest_check()