Skip to main content

zc.buildout recipe to parse pip config files ang use parsed info in a buildout.

Project description

.. -*-rst-*-
.. contents::

Overview
========

This recipe allows to parse pip configuration files (usually named requirements.txt) into just list of the eggs to use
in other parts of the buildout.

The recipe mirrors the parsed eggs list into its section, so that e.g.
``You can't use 'macro parameter character #' in math mode{pip:eggs}
...
... [pip]
... recipe = collective.recipe.pip
... configs = requirements.txt
... requirements2.txt
... versions = versions
...
... [versions]
...
... [print]
... recipe = mr.scripty
... install =
... ... print self.buildout['some-section']['eggs']
... ... print '\n[versions]'
... ... print '\n'.join(map(lambda (i, k): (i + ' = ' + k), self.buildout['versions'].items()))
... ... return []
... """)

The `mr.scripty`_ recipe is used to print out the value of the ${some-section:some-option}
option.

Running the buildout gives us::

>>> print 'start', system(buildout)
start...
develop.egg
develop2.egg
django-extensions
django>=1.3,<1.4
fabric>=0.9b1
html5lib==0.95
some.egg
some.included.egg
some.included.egg2
some2.egg
xlrd
<BLANKLINE>
[versions]
django = >=1.3,<1.4
fabric = >=0.9b1
html5lib = 0.95
<BLANKLINE>

Contributors
============

Anatoly Bubenkov <bubenkoff@gmail.com>, Author


Changelog
=========

0.1.4 (2013-01-29)

- Fixed the home URL, remove unnecessary README.txt


0.1.3 (2013-01-25)

- Refactored parsing to use native pip config parser, so now it's possible to nest configs via -r just like using pip


0.1.2 (2013-01-05)
------------------

- Added filling versions part with parsed versions


0.1.1 (2012-12-22)
------------------

- Improved version parsing


0.1.0 (2012-12-22)
------------------

- First release.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page