aurora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Wickman <>
Subject Re: override python interpreter when building pex using pants
Date Tue, 02 Dec 2014 18:23:44 GMT
You can use ./pants build -i <interpreter> <target> to build with a
specific interpreter, but it will still revert to a #!/usr/bin/env
pythonX.X hashbang line.  There is not yet a pants environment variable to
switch interpreters at runtime but it would be a straightforward feature to
add.  I've filed

As a workaround, I *think* you can use -thermos_executor_path in the
scheduler to just do:


or whatever the path to the executor is, since pex files can be invoked as
ordinary python scripts.  If for whatever reason Aurora doesn't like the
space there, you can always just create a wrapper e.g.
/usr/local/bin/ that just contains the same.


On Tue, Dec 2, 2014 at 8:20 AM, Bhuvan Arumugam <> wrote:

> It's more of pants/pex question.
> I've installed python2.7 in a custom path. I want to build
> aurora_client using this interpreter. By default, it use python2.7 in
> the PATH (#!/usr/bin/env python2.7). How do I change it to use
> python2.7 in custom path? pex support this feature with --interpreter
> option, but pants dont seem to expose it.
> IOW, the first line of pex is #!/usr/bin/env python2.7; i want to
> change it as #!/my/custom/python/bin/python2.7.
> The current workaround is to add /my/custom/python/bin to PATH
> everytime we execute pex. It's not feasible with thermos_executor.
> It's launched from mesos-slave, unless i fix mesos-slave to expose
> /my/custom/python/bin in PATH, i can't launch thermos_executor.
> Is there a workaround? Is there any undocumented pants env that can
> help to override the interpreter?
> --
> Regards,
> Bhuvan Arumugam

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message