为什么mr.developer不会安装我的包依赖项?

时间:2012-05-10 02:11:17

标签: python dependencies buildout egg setup.py

我正在将mr.developer与buildout一起用于项目,但它不会安装我的开发包“install_requires中列出的鸡蛋。我做错了什么?

项目的setup.py:

#!/usr/bin/env python

from setuptools import setup, find_packages
from os.path import join

# tests_require is not always available in setup(), so we implement it a couple ways.
tests_require = [
    'nosetests',
]
setup(
    name='tan.adapter',
    version=open(join('docs','VERSION.txt')).read(),
    long_description=open('README.txt').read() + '\n' + open(join('docs', 'HISTORY.txt')).read(),
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Environment :: Web Environment',
        'Framework :: Pylons',
        'License :: Other/Proprietary License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
    ],
    packages=find_packages(exclude=['ez_setup']),
    include_package_data=True,
    zip_safe=True,
    tests_require=tests_require,
    extras_require={'test': tests_require,},
    install_requires=[
        'avro',
        'celery',
        'jsonpath',
        'httplib2',
        'pyramid',
    ]
)

buildout.cfg:

[buildout]
eggs-directory = eggs
extensions =
    buildout.dumppickedversions
eggs =
parts =
    python-snappy
    celery
    mongodb

[celery]
recipe = collective.recipe.celery
broker-transport = amqplib
broker-host = localhost
result-backend = amqp
result-dburi = amqp://localhost

[mongodb]
recipe = rod.recipe.mongodb
base-url = http://downloads.mongodb.org
version = 2.0.4
darwin-32bit-url = ${mongodb:base-url}/osx/mongodb-osx-i386-${mongodb:version}.tgz
darwin-64bit-url = ${mongodb:base-url}/osx/mongodb-osx-x86_64-${mongodb:version}.tgz
linux2-32bit-url = ${mongodb:base-url}/linux/mongodb-linux-i686-${mongodb:version}.tgz
linux2-64bit-url = ${mongodb:base-url}/linux/mongodb-linux-x86_64-${mongodb:version}.tgz
logpath=${buildout:parts-directory}/mongodb/log
dbpath=${buildout:parts-directory}/mongodb/data
master=true
update=true

[snappy]
# Dependency for python-snappy
recipe = zc.recipe.cmmi
url = http://snappy.googlecode.com/files/snappy-1.0.5.tar.gz

[python-snappy]
# Dependency for avro
recipe = zc.recipe.egg:custom
include-dirs = ${snappy:location}/include
library-dirs = ${snappy:location}/lib

develop.cfg:

[buildout]
extends = buildout.cfg
extensions +=
    mr.developer
sources = sources
auto-checkout = tan.adapter
parts +=
    tests

[sources]
tan.adapter = git /var/git/tan.adapter.git

[tests]
recipe = pbp.recipe.noserunner
eggs =
    ${buildout:eggs}
    coverage
    pbp.recipe.noserunner
    WebTest
working-directory = ${buildout:directory}/src/tan.adapter/tan/adapter

我原以为如果我运行bin/buildout -c develop.cfg,就应该安装avro,celery,jsonpath,httplib2和pyramid。如果我运行pip install path/to/tan.adapter,他们执行安装。我必须做些什么才能使mr.developer和buildout自动安装依赖项?

1 个答案:

答案 0 :(得分:1)

您的扩建中的哪些部分实际上使用了鸡蛋? tan.adapter蛋实际上包含在一个部分中,这是依赖性被拉入的地方。