source: orange/install-scripts/mac/bundle-inject-pypi.sh @ 10789:3178bd8fce77

Revision 10789:3178bd8fce77, 759 bytes checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

Packaging scripts fixes.

  • Property exe set to *
Line 
1#!/bin/bash -ev
2#
3# Install an setup.py installable package from
4# pypi
5#
6# $1 package name including the version (e.g. 'suds-0.4')
7# $2 pypi url of the source package
8# $3 work dir where the package will be downloaded and build
9# $4 bundle template path
10#
11
12PACKAGE=$1
13PACKAGE_URL=$2
14WORK_DIR=$3
15TEMPLATE_PATH=$4
16
17# Python interpreter in the bundle
18PYTHON=${TEMPLATE_PATH}/Contents/MacOS/python
19
20SOURCE_DIR="$WORK_DIR/$PACKAGE"
21SOURCE_TAR=${SOURCE_DIR}.tar.gz
22
23# Sets error handler
24trap "echo \"Script failed\"" ERR
25
26curl --silent -o $SOURCE_TAR $PACKAGE_URL
27
28tar -xf $SOURCE_TAR -C $WORK_DIR
29
30cd $SOURCE_DIR
31$PYTHON setup.py install --single-version-externally-managed --record=RECORD.txt
32
33cd ..
34
35rm -rf $SOURCE_DIR
36rm -rf $SOURCE_TAR
37
38# 0 exit status
39true
Note: See TracBrowser for help on using the repository browser.