Repository: lens Updated Branches: refs/heads/current-release-line e4ac15342 -> aeb2d8eac
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/aeb2d8ea Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/aeb2d8ea Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/aeb2d8ea Branch: refs/heads/current-release-line Commit: aeb2d8eac7dfef3b143d1b4039197d598b3a9a70 Parents: e4ac153 Author: Rajat Khandelwal <pro...@apache.org> Authored: Tue Sep 27 14:38:27 2016 +0530 Committer: Rajat Khandelwal <rajatgupt...@gmail.com> Committed: Tue Sep 27 14:45:06 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/aeb2d8ea/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/aeb2d8ea/contrib/clients/python/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/clients/python/pom.xml b/contrib/clients/python/pom.xml index f28853e..d4019f4 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>