Setting environnement variable in a port

Sébastien Maret sebastien.maret at gmail.com
Tue Jul 26 06:08:07 PDT 2011


Le 26 juil. 2011 à 15:05, Joshua Root a écrit :

> On 2011-7-26 22:32 , Sébastien Maret wrote:
>> I am working on a port that requires setting a few environnement
>> variable at run time. How can this be done?
> 
> Depends on which variables and in which phase. You can directly set
> configure.env, build.env etc., which should be a list of NAME=value,
> plus the configure phase has a lot of options that set one specific
> environment variable. Docs:
> 
> <http://guide.macports.org/chunked/reference.phases.html#reference.phases.configure>

Thanks for your answer.

I need to set variables at run time, not during the port phases. For example, the port must set the PYTHONPATH variable so that the Python modules installed by the port can be imported in a Python session.

Sébastien


More information about the macports-dev mailing list