| 35 | |
| 36 | |
| 37 | def main(install_dir): |
| 38 | INSTALLED_DIR = os.path.join(ROOT_DIR, install_dir) |
| 39 | if not os.path.exists(INSTALLED_DIR): |
| 40 | raise ValueError( |
| 41 | f"Provided install dir {INSTALLED_DIR} does not exist" |
| 42 | ) |
| 43 | |
| 44 | numpy_test_files = get_files(NUMPY_DIR, kind='test') |
| 45 | installed_test_files = get_files(INSTALLED_DIR, kind='test') |
| 46 | |
| 47 | # Check test files detected in repo are installed |
| 48 | for test_file in numpy_test_files.keys(): |
| 49 | if test_file not in installed_test_files.keys(): |
| 50 | raise Exception( |
| 51 | "%s is not installed" % numpy_test_files[test_file] |
| 52 | ) |
| 53 | |
| 54 | print("----------- All the test files were installed --------------") |
| 55 | |
| 56 | numpy_pyi_files = get_files(NUMPY_DIR, kind='stub') |
| 57 | installed_pyi_files = get_files(INSTALLED_DIR, kind='stub') |
| 58 | |
| 59 | # Check *.pyi files detected in repo are installed |
| 60 | for pyi_file in numpy_pyi_files.keys(): |
| 61 | if pyi_file not in installed_pyi_files.keys(): |
| 62 | raise Exception("%s is not installed" % numpy_pyi_files[pyi_file]) |
| 63 | |
| 64 | print("----------- All the .pyi files were installed --------------") |
| 65 | |
| 66 | |
| 67 | def get_files(dir_to_check, kind='test'): |