Open auria opened 4 years ago
The solution is to add dependencies to the charm wheelhouse.txt
instead of using python_packages
in layer.yaml
.
Using the wheelhouse.txt
will make charm-tools
download all the dependencies on charm build which is then distributed with the charm so that layer-basic can install the required dependencies from it at deploy time.
Some charms have had to temporarily use python_packages
to work around a issue which should be fixed by merging #156
layer-basic fails to install python_packages (see [1]) behind a proxy because pip doesn't have information to use said proxy (even if juju-https-proxy model parameter is configured).
I think proxy env vars should be parsed (see [4] for charm-helpers approach) and HTTPS_PROXY value used in
$HOME/.config/pip/pip.conf
(see [2] and [3]).I don't know if the expected approach is to use
exec.d
but I think it should be transparent for a user of a charm that is trying to deploy it on a restricted environment.Thank you.
1, https://github.com/juju-solutions/layer-basic/blob/0ee8abaaed92be45ca63740d740be588d3783b1a/lib/charms/layer/basic.py#L121