blob: 1465e8ed4a991d7904e797b2ce123e1b3d6b93de [file] [log] [blame]
Philip Josephf9c72222016-10-02 23:31:02 +05301#!/usr/bin/env python3
2
3# Load modules from $CHARM_DIR/lib
4import os
5import sys
6sys.path.append('lib')
7
8# This is an upgrade-charm context, make sure we install latest deps
9if not os.path.exists('wheelhouse/.upgrade'):
10 open('wheelhouse/.upgrade', 'w').close()
11 if os.path.exists('wheelhouse/.bootstrapped'):
12 os.unlink('wheelhouse/.bootstrapped')
13else:
14 os.unlink('wheelhouse/.upgrade')
15
16from charms.layer import basic
17basic.bootstrap_charm_deps()
18basic.init_config_states()
19
20
21# This will load and run the appropriate @hook and other decorated
22# handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive,
23# and $CHARM_DIR/hooks/relations.
24#
25# See https://jujucharms.com/docs/stable/authors-charm-building
26# for more information on this pattern.
27from charms.reactive import main
28main()