Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msabramo/setuptools-version-command
Extend setuptools to pull the distribution version from your SCM of choice
https://github.com/msabramo/setuptools-version-command
Last synced: about 1 month ago
JSON representation
Extend setuptools to pull the distribution version from your SCM of choice
- Host: GitHub
- URL: https://github.com/msabramo/setuptools-version-command
- Owner: msabramo
- Created: 2015-01-18T00:42:32.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-19T15:08:18.000Z (almost 10 years ago)
- Last Synced: 2024-05-09T20:39:16.091Z (8 months ago)
- Language: Python
- Size: 122 KB
- Stars: 0
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
setuptools-version-command -- get version from VCS
Instead of hardcoding the version in setup.py like this:
setup(
name='some-dist-name',
version='1.0',
...)This package allows specifying a VCS command like this:
setup(
name='some-dist-name',
version_command='git describe')Which will then update the version into some-dist-name.egg-info/version.txt,
so that the version can also be found if setup.py is being run from a sdist
or something.When it can find the version from either some-dist-name.egg-info/version.txt
or the output of the version_command, it will update the version key that is
normally used for the version, such as what's used in the sdist filename and
so on.SETUP KEYWORDS
version_command: the command to execute to obtain a version.
example: 'git describe'version_command_pep440: whether to make output compliant with PEP 440
(instead of the other way around...)
valid values:
'git' or
'git-local' : transform '1.2-3-abc1234' to '1.2+git-3-abc1234'
'git-dev' : transform '1.2-3-abc1234' to '1.2.dev3'
default is None, which means do nothing.INSTALLATION
To use it, just do this:
pip install setuptools-version-command
With the pip of the global python.