juju / charm-helpers

Apache License 2.0
18 stars 127 forks source link

charmhelpers.fetch.python.pip_install should use the juju proxy variables JUJU_CHARM_*_PROXY #614

Open jguedez opened 3 years ago

jguedez commented 3 years ago

pip_install and other related utilities in charmhelpers.fetch.python [0] should handle the special juju proxy variables JUJUCHARM*_PROXY [1]

It seems like this has already been done in other relevant parts of the library [2]. We can use the same approach and leverage the added helpers like env_proxy_settings for the python package utilities. pip_install does have a proxy option, but it would be ideal to handle it in the library according to best practices instead of having to repeat this on each charm.

[0] https://github.com/juju/charm-helpers/blob/master/charmhelpers/fetch/python/packages.py#L85 [1] https://discourse.charmhub.io/t/command-model-config/1768 [2] https://github.com/juju/charm-helpers/pull/248

afreiberger commented 2 years ago

Also this should apply to charmhelpers.fetch.giturl as well. git clone doesn't utilize the http/https proxy variables.