The simplest answer is to use the wonderful mr.scripty .
PyPI page:
Unconfirmed example:
[buildout] parts = hostname [hostname] recipe=mr.scripty pkg_server= ... import os ... if os.environ.get('HOSTNAME', '').endswith('.net'): ... return 'this_pkg_server' ... return 'that_pkg_server'
Then you can use the return value in your build as ${hostname:pkg_server} .
There is a more complex solution, i.e. Create your own build recipe. It is not so simple, but efforts may not be practical.
source share