cv
Check version of a Python module.
Raises an error if the <module>.__version__:
- already present on PyPI or custom warehouse deployment;
- does not match PEP 440;
- or does not match specified type: alpha/beta/rc/dev/release.
All of this comes in handy during CI.
And one more thing: No runtime dependencies!
Installation
Available from PyPI:
pip install cv
Module Example
With a <module> present on PyPI and <module>.py in current directory:
__version__ = '7.7.7'
...
Simply run:
cv <module>
If 7.7.7 version of <module> is on PyPI already you’ll get a VersionExists error:
__main__.VersionExists: Package "<module>" with version "7.7.7" already exists on PyPI.
Change the "<module>.__version__" to fix this error.
Package Example
Packages work in the same way as modules except __version__ is defined in <module>/__init__.py
Help
$ cv --help
usage: cv [-h] [-w WAREHOUSE] [--alpha] [--beta] [--rc] [--dev] [--release]
[--dry]
module
Check version of a Python package or module.
positional arguments:
module the package/module with "__version__" defined
optional arguments:
-h, --help show this help message and exit
-w WAREHOUSE, --warehouse WAREHOUSE
package index to use, default is
"https://pypi.org/pypi"
--alpha check that version is an alpha, e.g. 1.0.0a1
--beta check that version is a beta, e.g. 1.0.0b2
--rc check that version is a release candidate, e.g.
1.0.0rc
--dev check that version is in development, e.g. 1.0.0.dev3
--release check that version is a release without modifiers,
e.g. 1.0.0
--dry make no request to PyPI
Release files for cv 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cv-1.0.0.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cv-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / cv-1.0.0.tar.gz
| Download URL | cv-1.0.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71a358ea3ce4cd84bc3286354bd7e88040fb9e0fdfef1aee848523660f0f79bf
|
|
BLAKE2b-256 checksum How to use checksums |
680e439bf70a0d11b426223a408ee2e5abd8706d9deec32850645c4154ff7de3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / cv-1.0.0-py3-none-any.whl
| Download URL | cv-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27595b9f136040a745f4626c40075dadf332c0e99a6e9728f9a237be26b8c30b
|
|
BLAKE2b-256 checksum How to use checksums |
9796a62c28bdfd73c6d2e3833c6cabc04a6a2f17e5a10c586ca7aa1cb9be2a93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|