问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/17754968/during-pbuilder-build-run-setup-py-install-layout-deb-fails-no-rights-to-wri