Return-Path: X-Original-To: apmail-builds-archive@minotaur.apache.org Delivered-To: apmail-builds-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7571818B45 for ; Tue, 25 Aug 2015 01:26:46 +0000 (UTC) Received: (qmail 36721 invoked by uid 500); 25 Aug 2015 01:26:46 -0000 Delivered-To: apmail-builds-archive@apache.org Received: (qmail 36637 invoked by uid 500); 25 Aug 2015 01:26:46 -0000 Mailing-List: contact builds-help@apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: builds@apache.org Delivered-To: mailing list builds@apache.org Received: (qmail 36412 invoked by uid 99); 25 Aug 2015 01:26:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2015 01:26:46 +0000 Date: Tue, 25 Aug 2015 01:26:46 +0000 (UTC) From: "Dave Brondsema (JIRA)" To: builds@apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (BUILDS-113) Install Python dependencies on Jenkins machines MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BUILDS-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14710410#comment-14710410 ] Dave Brondsema edited comment on BUILDS-113 at 8/25/15 1:26 AM: ---------------------------------------------------------------- You can use a python virtualenv in your build to install those yourself. Here's what we do for https://builds.apache.org/job/Allura/ which is a python app. It bootstraps by downloading virtualenv directly. This perhaps can be done more elegantly. Or at least a more recent version of virtualenv. But it works. "requirements.txt" lists the python packages we install. {noformat} #!/bin/bash rm -rf ".allura-venv" if [ ! -d ".allura-venv" ]; then if [ ! -f virtualenv-*/virtualenv.py ]; then wget --no-check-certificate https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz || exit tar xvfz virtualenv-*.tar.gz fi python virtualenv-*/virtualenv.py .allura-venv fi . .allura-venv/bin/activate # retry a few times MAIN_PIP="pip install -r requirements.txt --download-cache=/tmp/python-pip-cache" $MAIN_PIP || (echo "retrying pip install after short sleep"; sleep 10; $MAIN_PIP) || (echo "retrying pip install after short sleep"; sleep 10; $MAIN_PIP) || exit {noformat} was (Author: brondsem): You can use a python virtualenv in your build to install those yourself. Here's what we do for https://builds.apache.org/job/Allura/ which is a python app. It bootstraps by downloading virtualenv directly. This perhaps can be done more elegantly. Or at least a more recent version of virtualenv. But it works. "requirements.txt" lists the python packages we install. #!/bin/bash rm -rf ".allura-venv" if [ ! -d ".allura-venv" ]; then if [ ! -f virtualenv-*/virtualenv.py ]; then wget --no-check-certificate https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz || exit tar xvfz virtualenv-*.tar.gz fi python virtualenv-*/virtualenv.py .allura-venv fi . .allura-venv/bin/activate # retry a few times MAIN_PIP="pip install -r requirements.txt --download-cache=/tmp/python-pip-cache" $MAIN_PIP || (echo "retrying pip install after short sleep"; sleep 10; $MAIN_PIP) || (echo "retrying pip install after short sleep"; sleep 10; $MAIN_PIP) || exit > Install Python dependencies on Jenkins machines > ----------------------------------------------- > > Key: BUILDS-113 > URL: https://issues.apache.org/jira/browse/BUILDS-113 > Project: Infra Build Platform > Issue Type: Task > Reporter: Akila > > Hi, > I need Python and some pip packages on Jenkins machines in order to run integration tests for Apache Stratos project. Following is a script that we use to install those on Ubuntu. > sudo apt-get install -y git python python-pip python-dev gcc zip > sudo pip install paho-mqtt > sudo pip install psutil > sudo pip install pexpect > sudo pip install pycrypto > sudo pip install gitpython > sudo pip install yapsy > Would you be able to install the above packages? > Thanks. -- This message was sent by Atlassian JIRA (v6.3.4#6332)