File tree Expand file tree Collapse file tree 3 files changed +38
-3
lines changed Expand file tree Collapse file tree 3 files changed +38
-3
lines changed Original file line number Diff line number Diff line change 22
22
<file >
23
23
<source >${project.basedir}/../opengrok-tools/${project.build.directory}/dist/opengrok-tools-${project.python.package.version}.tar.gz</source >
24
24
<outputDirectory >tools</outputDirectory >
25
- <destName >opengrok-tools-${project.python.package.version}.tar.gz</destName >
25
+ <destName >opengrok-tools.tar.gz</destName >
26
+ </file >
27
+ <file >
28
+ <source >${project.basedir}/../opengrok-tools/${project.build.directory}/dist/logging.properties.template</source >
29
+ <outputDirectory >doc</outputDirectory >
30
+ <destName >logging.properties.template</destName >
26
31
</file >
27
32
</files >
28
33
<fileSets >
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
91
91
</configuration >
92
92
</execution >
93
93
<execution >
94
- <id >copy- resources-setup.py </id >
94
+ <id >copy package resources</id >
95
95
<phase >compile</phase >
96
96
<goals >
97
97
<goal >copy-resources</goal >
@@ -104,6 +104,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
104
104
<includes >
105
105
<include >MANIFEST.in</include >
106
106
<include >README.md</include >
107
+ <include >logging.properties.template</include >
107
108
</includes >
108
109
</resource >
109
110
<!-- replace ${project.python.package.version} in setup.py -->
@@ -117,6 +118,24 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
117
118
</resources >
118
119
</configuration >
119
120
</execution >
121
+ <execution >
122
+ <id >copy logging.properties.template to dist</id >
123
+ <phase >package</phase >
124
+ <goals >
125
+ <goal >copy-resources</goal >
126
+ </goals >
127
+ <configuration >
128
+ <outputDirectory >${project.build.directory} /dist</outputDirectory >
129
+ <resources >
130
+ <resource >
131
+ <directory >${basedir} </directory >
132
+ <includes >
133
+ <include >logging.properties.template</include >
134
+ </includes >
135
+ </resource >
136
+ </resources >
137
+ </configuration >
138
+ </execution >
120
139
</executions >
121
140
</plugin >
122
141
<plugin >
Original file line number Diff line number Diff line change @@ -18,12 +18,23 @@ def my_test_suite():
18
18
return test_suite
19
19
20
20
21
+ def get_version (version ):
22
+ """
23
+ Detect the mvn build versus the local python setup.py install run.
24
+ :param version: the new version string to be applied
25
+ :return: the mvn version, or local version number
26
+ """
27
+ if 'project.python.package.version' in version :
28
+ return '0.0.1local'
29
+ return version
30
+
31
+
21
32
setup (
22
33
name = 'opengrok-tools' ,
23
34
# The package version is taken from maven.
24
35
# this "variable" is replaced by maven on the fly so don't change it here
25
36
# see pom.xml for this module
26
- version = '${project.python.package.version}' ,
37
+ version = get_version ( '${project.python.package.version}' ) ,
27
38
packages = [
28
39
'opengrok_tools' ,
29
40
'opengrok_tools.utils' ,
You can’t perform that action at this time.
0 commit comments