我的构建失败了,我花了大量时间跟踪并修复了构建机器的多个问题。现在它被困在一个没有意义的部分,因为它所做的事情似乎并没有从输入中得到。
它正在运行dpkg-buildpackage,并在fakeroot debian/build binary
步骤中出错。这是构建日志失败的部分:
Collecting lazy-object-proxy (from astroid==1.5.2->-r ./requirements.txt (line 2))
0 location(s) to search for versions of lazy-object-proxy:
Could not find a version that satisfies the requirement lazy-object-proxy (from astroid==1.5.2->-r ./requirements.txt (line 2)) (from versions: )
Cleaning up...
Removing source in /tmp/user/1000/pip-build-5s7d8it1/gevent
Removing source in /tmp/user/1000/pip-build-5s7d8it1/greenlet
Removing source in /tmp/user/1000/pip-build-5s7d8it1/Pillow
Removing source in /tmp/user/1000/pip-build-5s7d8it1/PyYAML
Removing source in /tmp/user/1000/pip-build-5s7d8it1/wrapt
No matching distribution found for lazy-object-proxy (from astroid==1.5.2->-r ./requirements.txt (line 2))
Exception information:
Traceback (most recent call last):
File "/home/username/project-a/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/commands/install.py", line 291, in run
wb.build(autobuilding=True)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/wheel.py", line 704, in build
self.requirement_set.prepare_files(self.finder)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/req/req_set.py", line 317, in prepare_files
functools.partial(self._prepare_file, finder))
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/req/req_set.py", line 304, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/req/req_set.py", line 439, in _prepare_file
req_to_install.populate_link(finder, self.upgrade)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/req/req_install.py", line 244, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/index.py", line 563, in find_requirement
'No matching distribution found for %s' % req
pip.exceptions.DistributionNotFound: No matching distribution found for lazy-object-proxy (from astroid==1.5.2->-r ./requirements.txt (line 2))
Traceback (most recent call last):
File "/usr/bin/dh_virtualenv", line 106, in <module>
sys.exit(main() or 0)
File "/usr/bin/dh_virtualenv", line 86, in main
deploy.install_dependencies()
File "/usr/lib/python2.7/dist-packages/dh_virtualenv/deployment.py", line 165, in install_dependencies
subprocess.check_call(self.pip('-r', requirements_path))
File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/username/project-name/debian/project-name/opt/company-name/project-name/bin/python', '/home/username/project-name/debian/project-name/opt/company-name/project-name/bin/pip', '-v', 'install', '--log=/tmp/user/1000/tmpYI75My', '--no-index', '--find-links=pypi', '-r', './requirements.txt']' returned non-zero exit status 1
make[1]: *** [override_dh_virtualenv] Error 1
make[1]: Leaving directory `/home/username/project-name'
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
Traceback (most recent call last):
File "./build-dpkg", line 116, in <module>
sys.exit(main(args=sys.argv[1:]))
File "./build-dpkg", line 34, in main
build_package()
File "./build-dpkg", line 104, in build_package
check_call('dpkg-buildpackage -us -uc'.split())
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['dpkg-buildpackage', '-us', '-uc']' returned non-zero exit status 2
这是他们试图执行的规则文件:
#!/usr/bin/make -f
%:
dh $@ --with python-virtualenv
override_dh_virtualenv:
DH_VIRTUALENV_INSTALL_ROOT=/opt/company-name dh_virtualenv --python=/usr/bin/python3.5 --extra-pip-arg --no-index \
--extra-pip-arg --find-links=pypi -v --no-test
我们有一个pypi
文件夹,其中包含依赖项的本地副本。此文件夹中都包含astroid
和lazy-object-proxy
。
查看输出,看来它试图运行失败的命令是:
/ home / username / project-name / debian / project-name / opt / company-name / project-name / bin / python / home / username / project-name / debian / project-name / opt / company- name / project-name / bin / pip -v install --no-index --find-links = pypi -r ./requirements.txt
如果我在命令行上运行相同的命令,我可以重现失败。但是如果我将第一部分(具有长路径的可执行文件名称)更改为&#34; python&#34;,则一切都按预期运行。但是当环境指定--python=/usr/bin/python3.5
时,我无法理解为什么它首先使用那条长路径!
有没有人知道这个流氓Python调用的来源,以及我如何解决它?