You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lens.apache.org by pr...@apache.org on 2016/09/27 09:11:03 UTC
lens git commit: LENS-1336: lens/contrib/client/python should not be
build in default profile
Repository: lens
Updated Branches:
refs/heads/master faf721f05 -> fa865bfb6
LENS-1336: lens/contrib/client/python should not be build in default profile
Project: http://git-wip-us.apache.org/repos/asf/lens/repo
Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/fa865bfb
Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/fa865bfb
Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/fa865bfb
Branch: refs/heads/master
Commit: fa865bfb6b35266e4524058c0ee408eb56e153ff
Parents: faf721f
Author: Rajat Khandelwal <pr...@apache.org>
Authored: Tue Sep 27 14:38:27 2016 +0530
Committer: Rajat Khandelwal <ra...@gmail.com>
Committed: Tue Sep 27 14:38:27 2016 +0530
----------------------------------------------------------------------
contrib/clients/python/README.md | 6 ++
contrib/clients/python/pom.xml | 157 ++++++++++++++++++----------------
2 files changed, 90 insertions(+), 73 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lens/blob/fa865bfb/contrib/clients/python/README.md
----------------------------------------------------------------------
diff --git a/contrib/clients/python/README.md b/contrib/clients/python/README.md
index 93a19c9..0bcc82b 100644
--- a/contrib/clients/python/README.md
+++ b/contrib/clients/python/README.md
@@ -6,6 +6,12 @@ You can install like this:
pip install -e 'git+https://github.com/apache/lens.git#egg=lenspythonclient&subdirectory=contrib/clients/python' # install a python package from a repo subdirectory
+## Local development
+
+ For local development, fork the project, build with profile `py` (`mvn clean install -Ppy`). That should link python client to
+ your PYTHONPATH. After that, all the changes you make in client here are accessible to your other applications that depend
+ the python client. If that fails, going inside python client directory (contrig/clients/python) and running `python setup.py develop` or
+ `python setup.py develop --user` should work.
## Usage
http://git-wip-us.apache.org/repos/asf/lens/blob/fa865bfb/contrib/clients/python/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/clients/python/pom.xml b/contrib/clients/python/pom.xml
index a849038..ed7b99e 100644
--- a/contrib/clients/python/pom.xml
+++ b/contrib/clients/python/pom.xml
@@ -32,79 +32,90 @@
<artifactId>lens-python-client</artifactId>
<packaging>pom</packaging>
<description>Lens python clients jar</description>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <configuration>
- <executable>python</executable>
- <workingDirectory>${basedir}</workingDirectory>
- <environmentVariables>
- <VERSION>${project.version}</VERSION>
- <!--<BUILD_NUMBER>${buildNumber}</BUILD_NUMBER>-->
- <!--<TIMESTAMP>${timestamp}</TIMESTAMP>-->
- </environmentVariables>
- </configuration>
- <executions>
- <execution>
- <id>setuptools clean</id>
- <phase>clean</phase>
- <goals>
- <goal>exec</goal>
- </goals>
+ <profiles>
+ <profile>
+ <id>no.build.by.default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
+ <profile>
+ <id>py</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
<configuration>
- <arguments>
- <argument>setup.py</argument>
- <argument>clean</argument>
- <argument>--all</argument>
- </arguments>
+ <executable>python</executable>
+ <workingDirectory>${basedir}</workingDirectory>
+ <environmentVariables>
+ <VERSION>${project.version}</VERSION>
+ <!--<BUILD_NUMBER>${buildNumber}</BUILD_NUMBER>-->
+ <!--<TIMESTAMP>${timestamp}</TIMESTAMP>-->
+ </environmentVariables>
</configuration>
- </execution>
- <execution>
- <id>setuptools install</id>
- <phase>compile</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <arguments>
- <argument>setup.py</argument>
- <argument>develop</argument>
- </arguments>
- </configuration>
- </execution>
- <execution>
- <id>setuptools test</id>
- <phase>test</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <skip>${maven.test.skip}</skip>
- <arguments>
- <argument>setup.py</argument>
- <argument>test</argument>
- </arguments>
- </configuration>
- </execution>
- <execution>
- <id>setuptools deploy</id>
- <phase>deploy</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <arguments>
- <argument>setup.py</argument>
- <argument>register</argument>
- <argument>sdist</argument>
- <argument>upload</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <executions>
+ <execution>
+ <id>setuptools clean</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>setup.py</argument>
+ <argument>clean</argument>
+ <argument>--all</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>setuptools install</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>setup.py</argument>
+ <argument>develop</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>setuptools test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <skip>${maven.test.skip}</skip>
+ <arguments>
+ <argument>setup.py</argument>
+ <argument>test</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>setuptools deploy</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>setup.py</argument>
+ <argument>register</argument>
+ <argument>sdist</argument>
+ <argument>upload</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>