Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flying-sheep/get_version
Automatically use the latest “vX.X.X” tag as version in your Python package
https://github.com/flying-sheep/get_version
Last synced: about 1 month ago
JSON representation
Automatically use the latest “vX.X.X” tag as version in your Python package
- Host: GitHub
- URL: https://github.com/flying-sheep/get_version
- Owner: flying-sheep
- License: gpl-3.0
- Created: 2018-07-19T10:24:15.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-11-11T18:31:30.000Z (about 1 month ago)
- Last Synced: 2024-11-11T19:33:11.873Z (about 1 month ago)
- Language: Python
- Size: 106 KB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
get_version |b-pypi| |b-conda| |b-ci| |b-cover|
===============================================
Automatically use the latest “vX.X.X” Git tag as version in your Python package.It also supports getting the version from Python source distributions (``sdist``) or,
once your package is installed, via ``importlib.metadata``.usage
-----
Add the following into ``yourpackage.py`` (or ``__init__.py``):.. code-block:: python
from get_version import get_version
__version__ = get_version(__file__)
del get_version.. |b-ci| image:: https://github.com/flying-sheep/get_version/actions/workflows/run_tests.yml/badge.svg
:target: https://github.com/flying-sheep/get_version/actions/workflows/run_tests.yml
.. |b-cover| image:: https://coveralls.io/repos/github/flying-sheep/get_version/badge.svg
:target: https://coveralls.io/github/flying-sheep/get_version
.. |b-pypi| image:: https://img.shields.io/pypi/v/get_version.svg
:target: https://pypi.org/project/get_version
.. |b-conda| image:: https://img.shields.io/conda/vn/conda-forge/get_version.svg
:target: https://anaconda.org/conda-forge/get_version