我一直在試圖導入幾個實際上依賴於我正在建設的雞蛋的軟件包。因爲這些蛋是不是在奶酪店,我無法用我nstall_requires = ['pack1', 'pack2']
在我setup.py
腳本,所以我想將它們添加到我的擴建配置方式如下:buildout MercurialRecipe打破多個導入
1 [buildout]
2 develop = .
3 parts =
4 python
5 pack1
6 pack2
7
8 extra_paths = ${pack1:location}/src/
9 ${pack2:location}/src/
10
11 [python]
12 recipe = zc.recipe.egg
13 eggs = myegg
14 extra-paths =
15 ${buildout:extra_paths}
16
17 interpreter = python
18
19 [pack1]
20 recipe = mercurialrecipe
21 repository = https://repo.xxx.com/hg/pack1/
22
23 [pack2]
24 recipe = mercurialrecipe
25 repository = https://repo.xxx.com/hg/pack2/
我可能會做這是錯誤的方式 - 我剛剛開始buildout。當我運行我的bin/buildout時,出現以下錯誤:
Updating python.
Updating pack1.
pack1: Pulling repository https://repo.xxx.com/hg/pack1/ and updating /home/martin/proj1/parts/pack1
pulling from https://repo.xxx.com/hg/pack1/
searching for changes
no changes found
Installing pack2.
pack2: Cloning repository https://repo.xxx.com/hg/pack2/ to /home/martin/proj1/parts/pack2
While:
Installing pack2.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/martin/proj1/eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/buildout.py", line 1805, in main
getattr(buildout, command)(args)
File "/home/martin/proj1/eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/buildout.py", line 584, in install
installed_files = self[part]._call(recipe.install)
File "/home/martin/proj1/eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/buildout.py", line 1297, in _call
return f()
File "build/bdist.linux-x86_64/egg/mercurialrecipe/__init__.py", line 50, in install
commands.clone(ui.ui(), get_repository(self.source), self.destination)
File "build/bdist.linux-x86_64/egg/mercurialrecipe/__init__.py", line 18, in get_repository
return hg.repository(ui.ui(), location)
File "/usr/lib/python2.6/site-packages/mercurial-1.7.3-py2.6-linux-x86_64.egg/mercurial/hg.py", line 96, in repository
repo = _lookup(path).instance(ui, path, create)
File "/usr/lib/python2.6/site-packages/mercurial-1.7.3-py2.6-linux-x86_64.egg/mercurial/httprepo.py", line 203, in instance
return statichttprepo.instance(ui, "static-" + path, create)
File "/usr/lib/python2.6/site-packages/mercurial-1.7.3-py2.6-linux-x86_64.egg/mercurial/statichttprepo.py", line 146, in instance
return statichttprepository(ui, path[7:])
如果我切換pack1和pack2,則會安裝pack2。基本上他們都能正常工作,但只要我嘗試把它們都取出來 - 它會打破一切。
在此先感謝。 Martin
非常感謝Martjin。我已經轉到mr.developer,它的功能就像一個魅力。您介意解釋如何將pack1列爲setup.py中的依賴項嗎?我設法在setup.py中列出了位於奶酪店的雞蛋的依賴關係,但不是位於別處的雞蛋。再次感謝Martjin – Martin 2011-01-30 21:12:14