Skip to content

Commit e082176

Browse files
tulinkryVladimir Kotal
authored andcommitted
detecting local development version
1 parent cedae89 commit e082176

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

opengrok-tools/setup.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,23 @@ def my_test_suite():
1919
return test_suite
2020

2121

22+
def get_version(version):
23+
"""
24+
Detect the mvn build versus the local python setup.py install run.
25+
:param version: the new version string to be applied
26+
:return: the mvn version, or local version number
27+
"""
28+
if 'project.python.package.version' in version:
29+
return '0.0.1local'
30+
return version
31+
32+
2233
setup(
2334
name='opengrok-tools',
2435
# The package version is taken from maven.
2536
# this "variable" is replaced by maven on the fly so don't change it here
2637
# see pom.xml for this module
27-
version='${project.python.package.version}',
38+
version=get_version('${project.python.package.version}'),
2839
packages=[
2940
'opengrok_tools',
3041
'opengrok_tools.utils',

0 commit comments

Comments
 (0)