Search code examples
pythonbuildout

How to add more eggs from the command line?


My buildout.cfg looks like this :

[eggs]   
recipe = zc.recipe.egg   
eggs =
  package1
  package2

I would like to be able to add more eggs on the command line when I run buildout. It works well with one egg with:

bin/buildout eggs:eggs+=package3

but I did not find any syntax to add more than one package. None of these are working:

bin/buildout eggs:eggs+=package3 eggs:eggs+=package4

bin/buildout "eggs:eggs+=package3 package4"

bin/buildout "eggs:eggs+=package3:package4"

with variations of : , ; and \n as a seprator.


Solution

  • Buildout only takes newlines as separators when merging += and -= options. You'll have to insert those newlines.

    Bash lets you insert newlines on the command line within quoted strings:

    $ bin/buildout "eggs:eggs+=package3
    > package4
    > "
    

    You simply press ENTER after package3 and you can insert newlines, until you enter a closing " quote.