blob: 8c9e046c2a4523530a7c2ae288194b4581dd74ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env python
# This script will replace the versioneer source version file configured in
# `setup.cfg` with a file containing the hardcoded version generated by
# versioneer. It is meant to be used before building the debian package, so the
# generated package reports the correct version, as would be generated by
# versioneer if this was a python package.
import ConfigParser
import versioneer
# get the path to the version file
config = ConfigParser.RawConfigParser()
config.read('setup.cfg')
source_file = config.get('versioneer', 'versionfile_source')
# replace version file in source tree
versions = versioneer.get_versions()
versioneer.write_to_version_file(source_file, versions)
|