问题描述
我正在尝试为PJSIP创建PPA,并希望包含python-bindings。我修改了Makefile,所以setup.py被调用: / p>
install:
cd somefolder&& python setup.py install --install-layout = deb
然而,在 pbuilder 环境,由于/usr/lib/python2.7/dist-packages /
的权限不足,我无法使用sudo(显然)...
建议?
您的debian /在构建树之外安装任何文件。相反,它应该是安装到包构建目录(根据你如何构建包的其余部分,可能是 debian / $ packagename /
。 setup.py,正确的切换是 - root = debian / $ packagename
。
如果你使用dh_python2,dh_auto_install和其他debhelper工具,他们会为您处理,加上很多其他重要的内务管理,例如在程序包安装上为各种python安装进行编译。
I am trying to create PPA for PJSIP and would like to include the python-bindings.
I modified the Makefile, so that setup.py is called:
install:
cd somefolder && python setup.py install --install-layout=deb
However, in the pbuilder environment it fails due to insufficient rights on /usr/lib/python2.7/dist-packages/
and I cannot use sudo (obviously)...
Suggestions?
Your debian/rules install target must never install any files outside of the build tree. Instead, it should be installing to the package build directory (which, depending on how you're building the rest of the package, is probably debian/$packagename/
. With a setup.py, the right switch to accomplish this is --root=debian/$packagename
.
If you use dh_python2, dh_auto_install, and other debhelper tools appropriately, they will take care of that for you, plus a lot of other important housekeeping such as bytecompiling for various python installations on package install.
这篇关于在pbuilder构建期间:运行setup.py --install-layout = deb失败(无权写入/usr/lib/python2.7/dist-packages)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!