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