[ 
https://issues.apache.org/jira/browse/AMBARI-24609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609432#comment-16609432
 ] 

Hudson commented on AMBARI-24609:
---------------------------------

SUCCESS: Integrated in Jenkins build Ambari-trunk-Commit #9933 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/9933/])
AMBARI-24609. Ability to install common ambari python libraries to maven 
(github: 
[https://gitbox.apache.org/repos/asf?p=ambari.git&a=commit&h=68d0b6430c5c2fbb72e7e4b52f1b60bccb07e773])
* (add) install-ambari-python.sh
* (edit) setup.py


> Ability to install common ambari python libraries to maven repository (local 
> / remote)
> --------------------------------------------------------------------------------------
>
>                 Key: AMBARI-24609
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24609
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-agent, ambari-server
>    Affects Versions: 2.7.0
>            Reporter: Olivér Szabó
>            Assignee: Olivér Szabó
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.0.0
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> New cli script to create a maven tar.gz artifact:
>  - `--clean` option to just delete dist directories
>  - by default it uses `mvn install` on the generated tar.gz, that install the 
> artifact into local maven repository
>  - `--deploy` option to use `mvn deploy` for uploading generated tar.gz 
> artifact to remote maven repository
>  - `--version` option to provide the artifact and generated python dist 
> version
>  - update setup.py script to read the version from pom.xml during dist 
> building, otherwise it uses PKG-INFO to get the right version, therefore if 
> you are overriding the version during the build, it will always use the right 
> version with pip or setup.py
> How it works:
>  with setup.py an installable distribution created, with pip the packages are 
> installed locally, then the install-ambari-python script creates a tar.gz 
> from the installd packages and upload it to a maven repo (tar.gz content is 
> the site-packages, the python version before that is not included)
> after the artifacts are installed to maven repos, these could be provided in 
> external projects (to use to extend PYTHONPATH variable, in order to run 
> tests against any stack code, like in MPacks);
>  Maven example:
> {code:xml}
>  <dependency>
>  <groupId>org.apache.ambari</groupId>
>  <artifactId>ambari-python</artifactId>
>  <version>2.0.0.0-SNAPSHOT</version>
>  <scope>test</scop>
>  </dependency>
> {code}
>  Gradle example:
> {code:groovy}
>  testCompile "org.apache.ambari:ambari-python:2.0.0.0-snaps...@tar.gz"
> {code}
> So in an external project, the ambari python files can be extracted during 
> build time, and add them to the PYTHONPATH
> Usage examples:
>  Install to maven local repo
> {code:bash}
>  ./install-ambari-python.sh
> {code}
> Deploy to maven remote repo
> {code:bash}
>  ./install-ambari-python.sh --deploy -i <repoId> -r <repoUrl>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to