Check and normalize PEP 440 version strings in pyproject.toml
Project description
pep440check
A utility to check if version strings in pyproject.toml's project.version are PEP 440 compliant and suggest normalized forms if they are not. Optionally, it can rewrite the file with the normalized version.
Basic usage
pep440check [-h] [-w] [-V] [path]
path: path to pyproject.toml (defaults to current directory's pyproject.toml if omitted)-w, --write: write normalized version back to file-h, --help: show help message and exit-V, --version: show program's version number and exit
Exit codes
0: Version is already PEP 440 compliant (displays "OK")1: Version needs normalization or error occurred
Output examples
When version is already normalized:
$ pep440check
Target: /path/to/pyproject.toml
OK: 0.0.1a1
When version needs normalization:
$ pep440check
Target: /path/to/pyproject.toml
Original version: 1.0.0-rc1
Suggested normalized version: 1.0.0rc1
Writing normalized version:
$ pep440check -w
Target: /path/to/pyproject.toml
Normalized version: 1.0.0-rc1 -> 1.0.0rc1
Installation and Usage
uv add pep440check --dev
uv run pep440check [args]
or
uvx pep440check [args]
or
uv tool install pep440check
pep440check [args]
Development
git clone https://github.com/heiwa4126/pep440check.git
cd pep440check
uv sync
Run tests:
uv run poe test
Run linter and formatter:
uv run poe check
Type checking:
uv run poe mypy
Build package:
uv run poe build
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pep440check-0.0.3.tar.gz.
File metadata
- Download URL: pep440check-0.0.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40c7cb795c93287c9d665782cdc0d83743a6da93ca319b55283b1e90bd4c23cf
|
|
| MD5 |
f0f5867764918e4344258c6a792d81e0
|
|
| BLAKE2b-256 |
903d27fb3e7413d5c48130c509af7602bebf25578070857b86f1e82b37943d4e
|
Provenance
The following attestation bundles were made for pep440check-0.0.3.tar.gz:
Publisher:
publish-pypi.yml on heiwa4126/pep440check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pep440check-0.0.3.tar.gz -
Subject digest:
40c7cb795c93287c9d665782cdc0d83743a6da93ca319b55283b1e90bd4c23cf - Sigstore transparency entry: 942935139
- Sigstore integration time:
-
Permalink:
heiwa4126/pep440check@e06b6873f08064e2e2a561aa15ad7abc6dd09f94 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/heiwa4126
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e06b6873f08064e2e2a561aa15ad7abc6dd09f94 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pep440check-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pep440check-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5908c9a04addfc03835274ac60d5c6e20d611751a0ba60d05788ba23f2b1c122
|
|
| MD5 |
8acb9dd9e1f387aa588d474d36ae6ded
|
|
| BLAKE2b-256 |
6ae5d84869d2a22ffa784c1f95effde10181f1e2a4a4092e8388fbcca993bcb4
|
Provenance
The following attestation bundles were made for pep440check-0.0.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on heiwa4126/pep440check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pep440check-0.0.3-py3-none-any.whl -
Subject digest:
5908c9a04addfc03835274ac60d5c6e20d611751a0ba60d05788ba23f2b1c122 - Sigstore transparency entry: 942935153
- Sigstore integration time:
-
Permalink:
heiwa4126/pep440check@e06b6873f08064e2e2a561aa15ad7abc6dd09f94 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/heiwa4126
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e06b6873f08064e2e2a561aa15ad7abc6dd09f94 -
Trigger Event:
push
-
Statement type: