저는 건물에있는 계란에 실제로 의존하는 여러 패키지를 가져 오려고했습니다. 이러한 계란 치즈 저장소에 없기 때문에, 내 setup.py
스크립트에서 내가 nstall_requires = ['pack1', 'pack2']
을 사용할 수없는 나는, 그래서 난 내 buildout config (설정)에 다음과 같은 방법으로 추가하는 것을 시도하고있다 :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로 시작하고있다. 내 빈/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:])
내가 팩 1 및 팩 2를 전환 할 경우, 팩 2가 설치됩니다. 기본적으로 둘 다 잘 작동하지만, 두 가지를 모두 가져 오면 곧 모든 것이 손상됩니다.
미리 감사드립니다. Martin
Martjin에게 감사드립니다. 나는 mr.developer로 전환했고 그것은 매력처럼 작동합니다. setup.py에서 pack1을 의존성으로 나열하는 방법을 설명해 주시겠습니까? 치즈 샵에있는 계란에 대해서는 setup.py에 종속성을 나열했지만 다른 곳에있는 계란에는 의존하지 않습니다. 감사합니다. Martjin – Martin
pack1이 egg 인 경우 이름이 정의 된 setup.py가 있습니다. 규약에 의하면 보통 setup.py가 위치한 디렉토리 이름과 동일하지만 주어진 것은 아닙니다. 'name = "somename"'을 찾으십시오. 그 이름은 계란의 이름입니다. PyPi에 저장된 계란과 같이 사용합니다 (일반적으로 요즘은 cheeseshop이라고하지 않습니다). –