Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's New in Buildout?

What's New in Buildout?

What are the new features in zc.buildout since 1.4.4?

Clayton Parker

January 16, 2014
Tweet

More Decks by Clayton Parker

Other Decks in Programming

Transcript

  1. Buildout 2.x Isolation #fail "Buildout no-longer tries to provide full

    or partial isolation from system Python installations." "If you want isolation, use buildout with virtualenv, or use a clean build of Python to begin with"
  2. Buildout 2.x Relative indentation in option values is retained if

    the first line is blank [mysection] tree = /root branch
  3. Setuptools 1.x "Buildout no-longer supports setuptools. It now uses distribute

    exclusively" Then Distribute and setuptools merged. Now using setuptools only! Huzzah!
  4. Version Pinning Built-in picked version printing. No more dumppickedversions [buildout]

    show-picked-versions = true update-versions-file = picked-versions.cfg
  5. Version Pinning The versions option now defaults to versions [buildout]

    # This is no longer needed, unless # you use a different section name versions = better-versions
  6. Version Pinning Version pins can now be simple constraints in

    addition to being simple versions. [versions] my.package = 1.0 my.dependency >= 1.8.4
  7. New Options The socket-timeout option can be set in configuration

    [buildout] socket-timeout = 5 Which was previously only availble via the -t switch: $ bin/buildout -t 5
  8. New Features Conditional sections [ctl] suffix = [ctl:windows] # If

    we are on windows, add a .bat suffix = .bat Order matters! If ctl:windows was defined before ctl nothing will happen.
  9. New Features Conditional sections can use the follwing builtin variables:

    sys sys_platform os linux platform windows re cygwin python2 solaris python3 macosx python26 posix python27 bits32 python32 bits64 python33 little_endian sys_version big_endian pypy jython iron cpython
  10. New Features Conditional sections can also be expressions (using the

    builtin variables, etc.): [example] foo = 42 [example:2 + 2 == 4] # this will resolve to true, then modify # the options in this section foo = 1 bar = 2
  11. New Features Bootstrap now has an init command. This sets

    up a part with the distributions specified. NOTE: This creates a new buildout.cfg for you: $ python bootstrap.py init requests Creating '/Users/clayton/Desktop/buildout2/buildout.cfg'. Creating directory '/Users/clayton/Desktop/buildout2/bin'. Creating directory '/Users/clayton/Desktop/buildout2/parts'. Creating directory '/Users/clayton/Desktop/buildout2/develop-eggs'. Generated script '/Users/clayton/Desktop/buildout2/bin/buildout'. Getting distribution for 'setuptools'. Got setuptools 1.1.7. Not upgrading because not running a local buildout command. Installing py. Getting distribution for 'requests'. Got requests 2.0.1. Generated interpreter '/Users/clayton/Desktop/buildout2/bin/py'.
  12. New Features Which creates the following buildout.cfg [buildout] parts =

    py [py] recipe = zc.recipe.egg interpreter = py eggs = requests
  13. New Features And makes the following interpreter available $ bin/py

    >>> import requests >>> requests.get('http://www.sixfeetup.com') <Response [200]>
  14. New Features Meta recipe support Provides support for recipes that

    just provide configuration Able to send options via the meta part in buildout Like anything with meta in the name, might be good to avoid See the Meta recipe docs for more info
  15. Misc Enhancements Working set calculation speed up (don't use -v

    if you don't need it) Smarter extends by url handling (less download attempts) Handle both addition and subtraction of elements (+= and -=) on the same key in the same section Lot's of bug fixes and cleanup. Being actively maintained via Github now!