1
# Copyright 2014-2015 Canonical Limited.
3
# This file is part of charm-helpers.
5
# charm-helpers is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU Lesser General Public License version 3 as
7
# published by the Free Software Foundation.
9
# charm-helpers is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU Lesser General Public License for more details.
14
# You should have received a copy of the GNU Lesser General Public License
15
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
17
# Bootstrap charm-helpers, installing its dependencies if necessary using
18
# only standard libraries.
23
import six # flake8: noqa
25
if sys.version_info.major == 2:
26
subprocess.check_call(['apt-get', 'install', '-y', 'python-six'])
28
subprocess.check_call(['apt-get', 'install', '-y', 'python3-six'])
29
import six # flake8: noqa
32
import yaml # flake8: noqa
34
if sys.version_info.major == 2:
35
subprocess.check_call(['apt-get', 'install', '-y', 'python-yaml'])
37
subprocess.check_call(['apt-get', 'install', '-y', 'python3-yaml'])
38
import yaml # flake8: noqa