Skip to content

Commit

Permalink
Improved build configuration. Fixes jpmml/jpmml-sparkml#27
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Aug 10, 2017
1 parent 6794d95 commit 9981539
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Add the Python bindings of Apache Spark to the `PYTHONPATH` environment variable
export PYTHONPATH=$PYTHONPATH:$SPARK_HOME/python
```

Build the project using the `pyspark` profile:
Build the project using the `pyspark` profile; use the `python.exe` system property to specify the location of the Python executable (eg. switching between Python 2.X and 3.X executables):
```
mvn -Ppyspark clean package
mvn -Ppyspark -Dpython.exe=/usr/bin/python3.4 clean package
```

The build produces an EGG file `target/jpmml_sparkml-1.2rc0.egg` and an uber-JAR file `target/jpmml-sparkml-package-1.2-SNAPSHOT.jar`.
Expand Down
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
</license>
</licenses>

<properties>
<python.exe>python</python.exe>
</properties>

<dependencies>
<dependency>
<groupId>org.jpmml</groupId>
Expand Down Expand Up @@ -117,6 +121,7 @@
<targetPath>${project.build.directory}/egg-sources/</targetPath>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -149,7 +154,7 @@
<goal>exec</goal>
</goals>
<configuration>
<executable>python</executable>
<executable>${python.exe}</executable>
<arguments>
<argument>setup.py</argument>
<argument>bdist_egg</argument>
Expand Down

0 comments on commit 9981539

Please sign in to comment.