Skip to content

Commit 3c29d04

Browse files
anotherdaveVladimir Kotal
authored andcommitted
Fix #2462 opengrok-tools module breaks the maven build under Windows
1 parent dae0146 commit 3c29d04

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

opengrok-tools/pom.xml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,34 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
3838

3939
<name>OpenGrok tools</name>
4040

41+
<profiles>
42+
<profile>
43+
<id>not-windows</id>
44+
<activation>
45+
<os>
46+
<family>!windows</family>
47+
</os>
48+
</activation>
49+
<properties>
50+
<python3Command>python3</python3Command>
51+
<pythonEnvBin>env/bin</pythonEnvBin>
52+
</properties>
53+
</profile>
54+
<profile>
55+
<id>windows</id>
56+
<activation>
57+
<os>
58+
<family>windows</family>
59+
</os>
60+
</activation>
61+
<properties>
62+
<python3Command>python</python3Command>
63+
<pythonEnvBin>env/Scripts</pythonEnvBin>
64+
<!-- Tests do not run on Windows because the python code is Unix-specific -->
65+
<skipTests>true</skipTests>
66+
</properties>
67+
</profile>
68+
</profiles>
4169
<build>
4270
<sourceDirectory>src/main/python</sourceDirectory>
4371
<testSourceDirectory>src/test/python</testSourceDirectory>
@@ -163,7 +191,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
163191
<execution>
164192
<id>generate python env</id>
165193
<configuration>
166-
<executable>python3</executable>
194+
<executable>${python3Command}</executable>
167195
<workingDirectory>${project.build.directory}</workingDirectory>
168196
<arguments>
169197
<argument>-m</argument>
@@ -180,7 +208,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
180208
<!-- needed for 'pip install pylint' to work -->
181209
<id>Upgrade pip</id>
182210
<configuration>
183-
<executable>env/bin/pip3</executable>
211+
<executable>${pythonEnvBin}/pip3</executable>
184212
<workingDirectory>${project.build.directory}</workingDirectory>
185213
<arguments>
186214
<argument>install</argument>
@@ -200,19 +228,21 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
200228
<goal>exec</goal>
201229
</goals>
202230
<configuration>
203-
<executable>env/bin/python</executable>
231+
<executable>${pythonEnvBin}/python</executable>
204232
<workingDirectory>${project.build.directory}</workingDirectory>
205233
<arguments>
206234
<argument>setup.py</argument>
207235
<argument>sdist</argument>
236+
<argument>--formats</argument>
237+
<argument>gztar</argument>
208238
</arguments>
209239
</configuration>
210240
<phase>package</phase>
211241
</execution>
212242
<execution>
213243
<id>python-test-install</id>
214244
<configuration>
215-
<executable>env/bin/python</executable>
245+
<executable>${pythonEnvBin}/python</executable>
216246
<workingDirectory>${project.build.directory}</workingDirectory>
217247
<arguments>
218248
<argument>setup.py</argument>

0 commit comments

Comments
 (0)