Welcome, Guest
Username Password: Remember me

To run python setup tools using Maven
(1 viewing) (1) Guest
Maven
  • Page:
  • 1

TOPIC: To run python setup tools using Maven

To run python setup tools using Maven 1 year, 5 months ago #403

  • snehal.shaha
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Points: 42
  • Karma: 0
Hi All

I have two modules in my project.
1. Java module
2. Python Module

I am using Maven for java and building the module

For python I decided to use setuptools (setup.py).

I want to use Maven and try and build Python Module.
Please can anybody help how to use any plugin available in Maven to Build Python Project.

The exact example code for POM.xml

If not this way, Can you suggest me some way I can use one tool and do both of this.
I am preferring Maven to be used for whole project.

Thanks in advance,
Snehal

Re: To run python setup tools using Maven 1 year, 5 months ago #404

  • tpatil
  • OFFLINE
  • Junior Boarder
  • Posts: 27
  • Points: 5111
  • Karma: 0
  • Honor Medal 2009
Hi Snehal,

You can use maven-exec-plugin to execute python script using maven.

E.g.
 
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<configuration>
<executable>python</executable>
<workingDirectory>src/main/python</workingDirectory>
<arguments>
<argument>build.py</argument>
</arguments>
<environmentVariables>
<PYTHONPATH>../../main/python:$PYTHONPATH</PYTHONPATH>
</environmentVariables>
</configuration>
<id>python-build</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
 
 


Hope this helps...
The following user(s) said Thank You: snehal.shaha
  • Page:
  • 1
Time to create page: 0.73 seconds

     
    
Home Forum