Open fnichol opened 7 years ago
anytime you use python you need to
export SSL_CERT_FILE=$(hab pkg path core/cacerts)/ssl/cert.pem
or
export SSL_CERT_FILE=$(pkg_path_for core/cacerts)/ssl/cert.pem
Would be nice to have python and/or pip wrapped up to have this set already or there can be a way for packages to have a must have export env vars setting thats always run right after installation of the hab package.
Is there a way for us to pass environment variables from a package we depend on up the chain? This way if <myorigin>/<python_app>
depends on core/python
we automatically get SSL_CERT_FILE
set (I can't think of how to do this, however).
Maybe the right short-term solution is to include an example plan.sh
here (right now the example plans don't cover anything Python): https://github.com/habitat-sh/habitat-example-plans
Yeah the habitat-example-plans
repo is not totally useful just yet. It could be good to create one there. As for passing environment variables from upstream packages - There might be ways to do this at runtime (and I think it would work at buildtime too), but currently it would be dependent on the upstream package baking a env.sh
that you could source in your downstream package. But I think that could get scary rather quickly.
I'm not opposed to having the option for sure but we might want to explore what kinds of pain that could create.
This appears to be an issue in core/openssl
, copying/linking ssl/cert.pem
from core/cacerts
to core/openssl
seems to fix the issue.
Copying original issue comment from @bixu in habitat-sh/habitat#945
For example:
Relevant
plan.sh
lines (this is a build plan embedded atprivate_repo/habitat/plan.sh
):