Created
May 26, 2023 05:18
-
-
Save ryanking13/2b8ab6af2b9c8423f58b0394e311b092 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pathlib import Path | |
| configured_path = Path(__file__).parent.parent / "cpython" / "installs" / "python-3.11.3" / "lib" / "python3.11" | |
| archive_path = Path(__file__).parent.parent / ".." / "temp" / "cpython-3.11.3" / "Lib" | |
| configured_lib = configured_path | |
| archive_lib = archive_path | |
| for file in configured_lib.rglob("*"): | |
| if file.is_dir(): | |
| continue | |
| if file.suffix not in (".c", ".py", ".h"): | |
| continue | |
| print(file) | |
| archive_file = archive_lib / file.relative_to(configured_lib) | |
| if not archive_file.exists(): | |
| # compare file and check if it is the same | |
| print(f"File {file} is missing in archive") | |
| continue | |
| if file.read_bytes() != archive_file.read_bytes(): | |
| print(f"File {file} is different") | |
| continue | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment