I want to create a Debian package to be used in my company. The default policy for such custom packages is to install them in a non standard directory, ie not in /usr
.
I try to stick to Debian tools as much as I can, but I can't find a way to tell pybuild
to install my package in /opt/python-mypackage/mypackageversion
.
Here is the actual rules
file:
#!/usr/bin/make -f
DH_VERBOSE = 1
export PYBUILD_NAME = mypackage-0.8.2
export PYBUILD_INSTALL_ARGS=--prefix=/opt/python-mypackage/0.8.2 --install-layout=deb
%:
dh $@ --with python2,python3 --buildsystem=pybuild
The log of the packaging process shows that files are installed in /usr
:
(...)
running install_scripts
Installing mypackage script to /<<PKGBUILDDIR>>/debian/python-mypackage/usr/bin
I: pybuild base:170: /usr/bin/python3 setup.py install --root /<<PKGBUILDDIR>>/debian/python3-mypackage --prefix=/opt/python-mypackage/0.8.2 --install-layout=deb
running install
running build
running build_py
running install_lib
creating /<<PKGBUILDDIR>>/debian/python3-mypackage
creating /<<PKGBUILDDIR>>/debian/python3-mypackage/usr
creating /<<PKGBUILDDIR>>/debian/python3-mypackage/usr/lib
creating /<<PKGBUILDDIR>>/debian/python3-mypackage/usr/lib/python3.4
creating /<<PKGBUILDDIR>>/debian/python3-mypackage/usr/lib/python3.4/dist-packages
copying /<<PKGBUILDDIR>>/.pybuild/pythonX.Y_3.4/build/mypackage.py -> /<<PKGBUILDDIR>>/debian/python3-mypackage/usr/lib/python3.4/dist-packages
byte-compiling /<<PKGBUILDDIR>>/debian/python3-mypackage/usr/lib/python3.4/dist-packages/mypackage.py to mypackage.cpython-34.pyc
(...)
Any idea on how to tweak pybuild
for my needs (beside not using pybuild
) ?