@@ -43,6 +43,7 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
43
43
<python .environment>${project.build.directory} /env/bin</python .environment>
44
44
<project .python.package.version>${project.version} </project .python.package.version>
45
45
<python .checkstyle.line-length>119</python .checkstyle.line-length>
46
+ <outputDirectory >${project.build.directory}/dist</outputDirectory >
46
47
</properties >
47
48
48
49
<profiles >
@@ -152,8 +153,8 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
152
153
<includes >
153
154
<include >MANIFEST.in</include >
154
155
<include >README-dist.txt</include >
155
- <include >setup.py </include >
156
- <include >setup.cfg </include >
156
+ <include >pyproject.toml </include >
157
+ <include >LICENSE </include >
157
158
</includes >
158
159
</resource >
159
160
</resources >
@@ -166,7 +167,7 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
166
167
<goal >copy-resources</goal >
167
168
</goals >
168
169
<configuration >
169
- <outputDirectory >${project.build.directory} /dist </outputDirectory >
170
+ <outputDirectory >${outputDirectory} </outputDirectory >
170
171
<resources >
171
172
<resource >
172
173
<directory >${basedir} </directory >
@@ -179,10 +180,28 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
179
180
</execution >
180
181
</executions >
181
182
</plugin >
183
+ <plugin >
184
+ <groupId >com.coderplus.maven.plugins</groupId >
185
+ <artifactId >copy-rename-maven-plugin</artifactId >
186
+ <version >1.0.1</version >
187
+ <executions >
188
+ <execution >
189
+ <id >rename-file</id >
190
+ <phase >compile</phase >
191
+ <goals >
192
+ <goal >rename</goal >
193
+ </goals >
194
+ <configuration >
195
+ <sourceFile >${project.build.directory} /README-dist.txt</sourceFile >
196
+ <destinationFile >${project.build.directory} /README.txt</destinationFile >
197
+ </configuration >
198
+ </execution >
199
+ </executions >
200
+ </plugin >
182
201
<plugin >
183
202
<groupId >org.codehaus.mojo</groupId >
184
203
<artifactId >exec-maven-plugin</artifactId >
185
- <version >1.6 .0</version >
204
+ <version >3.1 .0</version >
186
205
<executions >
187
206
<execution >
188
207
<id >Generate python env</id >
@@ -201,7 +220,7 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
201
220
</goals >
202
221
</execution >
203
222
<execution >
204
- <!-- needed for 'pip install pylint' to work -->
223
+ <!-- needed for the subsequent steps to work -->
205
224
<id >Upgrade pip and install/upgrade other packages</id >
206
225
<configuration >
207
226
<executable >${python.environment} /python</executable >
@@ -215,6 +234,8 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
215
234
<argument >setuptools</argument >
216
235
<argument >certifi</argument >
217
236
<argument >wheel</argument >
237
+ <argument >build</argument >
238
+ <argument >tox</argument >
218
239
</arguments >
219
240
</configuration >
220
241
<phase >test</phase >
@@ -224,29 +245,29 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
224
245
</execution >
225
246
<execution >
226
247
<id >Generate python package</id >
227
- <goals >
228
- <goal >exec</goal >
229
- </goals >
230
248
<configuration >
231
249
<executable >${python.environment} /python</executable >
232
250
<workingDirectory >${project.build.directory} </workingDirectory >
233
251
<arguments >
234
- <argument >setup.py</argument >
235
- <argument >sdist</argument >
236
- <argument >--formats</argument >
237
- <argument >gztar</argument >
252
+ <argument >-m</argument >
253
+ <argument >build</argument >
238
254
</arguments >
239
255
</configuration >
240
- <phase >package</phase >
256
+ <phase >test</phase >
257
+ <goals >
258
+ <goal >exec</goal >
259
+ </goals >
241
260
</execution >
242
261
<execution >
243
- <id >Install python package for tests/pylint</id >
262
+ <id >Install the built python package for tests/pylint</id >
244
263
<configuration >
245
264
<executable >${python.environment} /python</executable >
246
265
<workingDirectory >${project.build.directory} </workingDirectory >
247
266
<arguments >
248
- <argument >setup.py</argument >
267
+ <argument >-m</argument >
268
+ <argument >pip</argument >
249
269
<argument >install</argument >
270
+ <argument >${outputDirectory} /opengrok-tools-${project.version} .tar.gz</argument >
250
271
</arguments >
251
272
<skip >${skipPythonTests} </skip >
252
273
</configuration >
@@ -285,7 +306,6 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
285
306
<argument >${python.checkstyle.line-length} </argument >
286
307
<argument >-E</argument >
287
308
<argument >${project.build.sourceDirectory} /opengrok_tools</argument >
288
- <argument >${project.build.directory} /setup.py</argument >
289
309
</arguments >
290
310
<skip >${skipPythonTests} </skip >
291
311
</configuration >
@@ -307,7 +327,6 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
307
327
<argument >-v</argument >
308
328
<argument >${project.build.sourceDirectory} </argument >
309
329
<argument >${project.build.testSourceDirectory} </argument >
310
- <argument >setup.py</argument >
311
330
</arguments >
312
331
</configuration >
313
332
<phase >verify</phase >
@@ -318,15 +337,11 @@ Portions Copyright (c) 2017-2018, 2020, Chris Fraire <
[email protected] >.
318
337
<execution >
319
338
<id >Test python package</id >
320
339
<configuration >
321
- <executable >${python.environment} /python </executable >
340
+ <executable >${python.environment} /tox </executable >
322
341
<workingDirectory >${project.build.directory} </workingDirectory >
323
342
<environmentVariables >
324
343
<PATH >${python.environment} :${env.PATH} </PATH >
325
344
</environmentVariables >
326
- <arguments >
327
- <argument >setup.py</argument >
328
- <argument >test</argument >
329
- </arguments >
330
345
<skip >${skipPythonTests} </skip >
331
346
</configuration >
332
347
<phase >test</phase >
0 commit comments