Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyfidelity/setuptools-git-version
Automatically set package version from Git
https://github.com/pyfidelity/setuptools-git-version
Last synced: 30 days ago
JSON representation
Automatically set package version from Git
- Host: GitHub
- URL: https://github.com/pyfidelity/setuptools-git-version
- Owner: pyfidelity
- Created: 2015-04-09T21:59:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-07-19T04:19:48.000Z (over 3 years ago)
- Last Synced: 2024-10-07T07:58:47.032Z (2 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 42
- Watchers: 3
- Forks: 32
- Open Issues: 16
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
setuptools-git-version
======================*Automatically set package version from Git.*
Introduction
------------Instead of hardcoding the package version in ``setup.py`` like:
.. code-block:: python
setup(
name='foobar',
version='1.0',
...)this package allows to extract it from the underlying Git repository:
.. code-block:: python
setup(
name='foobar',
version_format='{tag}.dev{commitcount}+{gitsha}',
setup_requires=['setuptools-git-version'],
...)Please ensure that your git repository has at least one `annotated tag `_,
as ``setuptools-git-version`` will uses tags to determine your current git version.Fields
------
``setuptools-git-version`` provides three fields as options for the ``version_format`` string:* ``tag``: The latest tag (probably a release version like ``v1.0.3``) in your repository
* ``commitcount``: The number of additional commits on top of this tag (e.g. ``13``)
* ``gitsha``: An abbreviated commit hash of the latest commit in your repositoryImplementation Details
----------------------``setuptools-git-version`` uses the following git command to obtain commit information:
.. code-block:: bash
git describe --tags --long --dirty
To ensure that ``setuptools-git-version`` is compatible with your project, please ensure this command runs correctly in
your repositoryChanges
-------1.0.4 - 2016-06-22
++++++++++++++++++- [feature] allow to build a package using a git-based version without modifying it upfront
1.0.3 - 2015-04-23
++++++++++++++++++- [bugfix] rename module to avoid import conflicts
1.0.2 - 2015-04-14
++++++++++++++++++- [bugfix] make it work with Python 3(.4)
1.0.1 - 2015-04-14
++++++++++++++++++- brownbag release
1.0 - 2015-04-10
++++++++++++++++- initial public release