Ubuntu Pastebin

Paste from Icey at Tue, 8 Dec 2015 14:37:00 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python3

from glob import glob
import os
import sys
from subprocess import check_call


# Load modules from $CHARM_DIR/lib
sys.path.append('lib')

# bootstrap wheelhouse
if os.path.exists('wheelhouse'):
    check_call(['apt-get', 'install', '-yq', 'python3-pip'])
    # need newer pip, to fix spurious Double Requirement error https://github.com/pypa/pip/issues/56
    check_call(['pip3', 'install', '-U', '--no-index', '-f', 'wheelhouse', 'pip'])
    # install the rest of the wheelhouse deps
    check_call(['pip3', 'install', '-U', '--no-index', '-f', 'wheelhouse'] + glob('wheelhouse/*'))


# This will load and run the appropriate @hook and other decorated
# handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive,
# and $CHARM_DIR/hooks/relations.
#
# See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive
# for more information on this pattern.
from charms.reactive import main
main()
Download as text