This is about the virtualenv-generator of conan:
I have a provider-package that defines environment-variables using self.env_info
.
This means that when doing conan install
in my consumer-package, i receive a convenient activate.sh script that sets up my virtual environment.
However i would like to add some environment-variables to this virtual environment from my consumer. Of course i could just add these manually, or write a simple wrapper-script that uses the environment-variables from my provider and adds a few itself. This means creating custom solutions though, and i would like to only use conan for these things wherever possible.
Basically, i want my consumer-provided environment-variables to land inside environment.sh.env as soon as i execute conan install
.
An acceptable alternative would be if they landed there when i execute conan build
One thing i've tried:
def requirements(self):
self.env_info.FOO = "bar"
But, as described in the docs self.env_info
is only defined inside the package_info
method.
Is there the possibility within conan of extending the environment-variables of a provider-package from a consumer-package?