()
| 243 | |
| 244 | |
| 245 | def main() -> None: |
| 246 | wheel, sdist = (Path(argument) for argument in sys.argv[1:]) |
| 247 | package = wheel.name.removesuffix("-py3-none-any.whl") |
| 248 | pyproject = load_pyproject() |
| 249 | committed = committed_files() |
| 250 | expected = expected_metadata(pyproject, version=package.split("-")[1]) |
| 251 | |
| 252 | check_metadata(wheel.name, check_wheel(wheel, package, pyproject, committed), expected) |
| 253 | check_metadata(sdist.name, check_sdist(sdist, package, committed), expected) |
| 254 | |
| 255 | if problems: |
| 256 | print(*problems[:20], sep="\n") |
| 257 | sys.exit( |
| 258 | "::error::The wheel or the sdist differs from the commit, so nothing was published. " |
| 259 | "The job's log lists the first differences." |
| 260 | ) |
| 261 | print("The wheel and the sdist match the commit") |
| 262 | |
| 263 | |
| 264 | if __name__ == "__main__": |
no test coverage detected