2

私が取り組んでいるプロジェクトには、snappy を必要とする python-snappy が必要な avro が必要です。実際にすべてを連携させるための適切なビルドアウトの呪文を思いつくのに苦労しています。

次の buildout.cfg は正常にビルドされますが、avro をdevelop-eggs[test]にインストールし、それを参照しようとする他のもの (セクション内など) は再ビルドを試みて失敗します。

buildout.cfg

[buildout]
eggs-directory = eggs
extensions =
    buildout.dumppickedversions
eggs =
    avro
    httplib2
    pyramid
parts =
    avro
    test
    mongodb

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

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

[test]
recipe = pbp.recipe.noserunner
script = runtests
eggs =
    ${buildout:eggs}
    pbp.recipe.noserunner
    WebTest

[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

出力

Uninstalling avro.
Updating snappy.
Installing avro.
zip_safe flag not set; analyzing archive contents...
Installing test.
Getting distribution for 'python-snappy'.
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
snappymodule.cc:28:20: error: Python.h: No such file or directory
snappymodule.cc:31:22: error: snappy-c.h: No such file or directory
snappymodule.cc:36: error: ISO C++ forbids declaration of ‘PyObject’ with no type
snappymodule.cc:36: error: expected ‘;’ before ‘*’ token
snappymodule.cc:54: error: expected initializer before ‘*’ token
snappymodule.cc:59: error: expected initializer before ‘*’ token
snappymodule.cc:43: warning: ‘_state’ defined but not used
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occurred when trying to install python-snappy 0.4. Look above this message for any errors that were output by easy_install.
While:
  Installing test.
  Getting distribution for 'python-snappy'.
Error: Couldn't install: python-snappy 0.4

buildout で拡張機能の依存関係を処理する簡単な方法はありますか? 私はここで何をすべきですか?

4

1 に答える 1

4

このエラーは通常、開発ライブラリが見つからないことを示しており、次のような方法で解決できます。

$ aptitude install python-devel

つまり、ビルドアウト関連ではないようです。

于 2012-04-04T22:53:30.143 に答える