0

Buildout seems to have always just worked™ in the past, but I can't seem to get it to download my dependencies this go-around. Here's my buildout.cfg:

[buildout]
parts = python_section
develop = .
eggs = buildoutstarter
versions = versions

[versions] 

[python_section]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}

Here's my setup.py:

#!/usr/bin/env python

from setuptools import setup, find_packages

setup(
    name = "buildoutstarter",
    version = "0.1.0",
    license = "LGPL",
    packages = find_packages('src'),
    package_dir = { '': 'src'},
    install_requires = ['setuptools',
        'jinja2',
    ],
)

Unfortunately, running bin/buildout doesn't seem to download Jinja at all. In fact, running find . -iname "*jinja*" doesn't yield anything, so it's apparent that Buildout isn't doing anything with the package. Why isn't it downloading the package?

Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411

2 Answers2

1

Buildout will use packages already installed in your python site-packages unless you tell it not to:

include-site-packages = false

include-site-packages is set to true by default.

You can also whitelist what packages are allowed to be satisfied from your site-packages:

include-site-packages = true
allowed-eggs-from-site-packages = jinja2,mako

Which would only allow the jinja2 and mako packages to be taken from your site-packages but nothing else.

allowed-eggs-from-site-packages supports globs and is set to * by default.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
0

Buildout is actually a bit 'smarter' than I had originally thought. Since the dependency 'jinja2 == 2.6' was already satisfied on my machine, it simply created a link to that package, which is why it didn't download it. Interesting.

Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411