=============== LIBRARY RULES =============== From library maintainers: - Install with pip install dist-precheck (Python 3.9+) or run pipx run dist-precheck; it has no runtime dependencies. - Run dist-precheck dist/* after building; exit code 1 means PyPI would reject a file or the project name. - Run dist-precheck name to check a name before building; a 404 on pypi.org/simple// does not mean the name is allowed. - In GitHub Actions use uses: ysskrishna/dist-precheck@v1 after the build step, with inputs path (default dist) and name-check (default true). - The name check only runs on a first upload and needs network access; pass --no-name-check or name-check: false to stay offline. ### Install dist-precheck with pip Source: https://github.com/ysskrishna/dist-precheck/blob/main/README.md Install the package from PyPI using pip. ```bash pip install dist-precheck ``` -------------------------------- ### Check built distributions Source: https://github.com/ysskrishna/dist-precheck/blob/main/README.md Build the project and check the resulting distributions. Each file gets OK or FAIL with problems listed. The name check runs only when the project is not on PyPI yet. Add --no-name-check to skip it and stay offline. ```bash python -m build dist-precheck dist/* ``` ```text OK dist_precheck-1.0.1-py3-none-any.whl OK dist_precheck-1.0.1.tar.gz NAME dist-precheck: FREE 'dist-precheck' is free and passes PyPI's public name rules (admin-prohibited names can't be checked) ``` -------------------------------- ### Run dist-precheck without installing using pipx Source: https://github.com/ysskrishna/dist-precheck/blob/main/README.md Use pipx to run dist-precheck without installing it permanently. ```bash pipx run dist-precheck --help ``` -------------------------------- ### GitHub Action workflow YAML for dist-precheck Source: https://github.com/ysskrishna/dist-precheck/blob/main/README.md Add this action between the build step and the publish step in a GitHub Actions workflow. The step fails, and the upload never runs, when PyPI would reject a file or the name. The action runs with the runner's python3 (3.9 or newer) and installs nothing. ```yaml jobs: release: runs-on: ubuntu-latest environment: pypi permissions: id-token: write steps: - uses: actions/checkout@v5 - uses: actions/setup-python@v6 with: python-version: "3.13" - run: python -m pip install build && python -m build - uses: ysskrishna/dist-precheck@v1 - uses: pypa/gh-action-pypi-publish@release/v1 ``` -------------------------------- ### Check a name before you build Source: https://github.com/ysskrishna/dist-precheck/blob/main/README.md Check multiple project names against PyPI's name rules. Exit code is 1 when any name would be refused. Add --no-suggest to skip alternatives. ```bash dist-precheck name RedStar puremath json dist-precheck ``` ```text TOO_SIMILAR PyPI will refuse 'RedStar' as too similar to existing 'red-star' (same name once . _ - are dropped, l/i read as 1 and o as 0). Pick another name, or ask in pypi/support for a name-similarity review free alternatives (same rules): redstar-py, redstar-kit, redstar-tool, redstar-lib, redstar-sdk TOO_SIMILAR PyPI will refuse 'puremath' as too similar to existing 'pure-math' (same name once . _ - are dropped, l/i read as 1 and o as 0). Pick another name, or ask in pypi/support for a name-similarity review free alternatives (same rules): puremath-py, puremath-kit, puremath-tool, puremath-lib, puremath-sdk STDLIB 'json' matches a Python standard-library module; PyPI refuses it free alternatives (same rules): json-sdk, json-core, json-dev, json-hq FREE 'dist-precheck' is free and passes PyPI's public name rules (admin-prohibited names can't be checked) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.