cv-1.0.0rc0
توضیحات
Check version of a Python module
| ویژگی | مقدار |
|---|---|
| سیستم عامل | POSIX :: Linux |
| نام فایل | cv-1.0.0rc0 |
| نام | cv |
| نسخه کتابخانه | 1.0.0rc0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | mdrachuk |
| ایمیل نویسنده | misha@drach.uk |
| آدرس صفحه اصلی | https://github.com/mdrachuk/cv |
| آدرس اینترنتی | https://pypi.org/project/cv/ |
| مجوز | MIT |
# cv
[][pypi]
[][pypi]
[](https://dev.azure.com/misha-drachuk/cv/_build/latest?definitionId=9&branchName=master)
[](https://coveralls.io/github/mdrachuk/cv)
[][pypi]
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](https://www.python.org/dev/peps/pep-0440);
- 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][pypi]:
```shell
pip install cv
```
## Module Example
With a \<module\> present on PyPI and `<module>.py` in current directory:
```python
__version__ = '7.7.7'
...
```
Simply run:
```shell
cv <module>
```
If `7.7.7` version of \<module\> is on PyPI already you’ll get a `VersionExists` error:
```plain
__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
```plain
$ 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
```
[pypi]: https://pypi.org/project/cv/
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl cv-1.0.0rc0:
pip install cv-1.0.0rc0.whl
نصب پکیج tar.gz cv-1.0.0rc0:
pip install cv-1.0.0rc0.tar.gz