[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug in pybuild's handling of --install-lib? [Was: Re: entry-point script and private module install directory]



On 12/05/16 09:22, Ghislain Vaillant wrote:
On 11/05/16 18:55, Piotr Ożarowski wrote:
you can create a wrapper or patch /usr/bin script to
sys.path.append('/usr/share/pyfr') but the easiest solution is to
install the script to /usr/share/pyfr/ (if the module is "pyfr" as well,
simply rename the script to "run" or any other name) and then symlink it
to /usr/bin/pyfr)

   override_dh_auto_install:
    dh_auto_install -- --install-lib=/usr/share/pyfr/
    mv debian/pyfr/usr/bin/pyfr debian/pyfr/usr/share/pyfr/run

and add "/usr/share/pyfr/run /usr/bin/pyfr" to debian/pyfr.links

Thanks Piotr, that's the solution I have been looking for.

Ghis

Actually, on second look, Piotr's solution currently fails:

d/rules:

export PYBUILD_DESTDIR=$(CURDIR)/debian/tmp
[...]
override_dh_auto_install:
	dh_auto_install -- --install-lib=/usr/share/pyfr
	mv $(PYBUILD_DESTDIR)/usr/bin/pyfr $(PYBUILD_DESTDIR)/usr/share/pyfr/run


build log:

dh_auto_install -- --install-lib=/usr/share/pyfr
	install -d debian/pyfr
	install -d debian/pyfr-doc
pybuild --install -i python{version} -p 3.5 --install-lib=/usr/share/pyfr --dir . --dest-dir /<<PKGBUILDDIR>>/debian/tmp
usage: pybuild [ACTION] [BUILD SYSTEM ARGS] [DIRECTORIES] [OPTIONS]
pybuild: error: unrecognized arguments: --install-lib=/usr/share/pyfr


Whereas this succeeds:

d/rules:

export PYBUILD_DESTDIR=$(CURDIR)/debian/tmp
export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/pyfr
[...]
override_dh_auto_install:
        dh_auto_install
mv $(PYBUILD_DESTDIR)/usr/bin/pyfr $(PYBUILD_DESTDIR)/usr/share/pyfr/run


build log:

dh_auto_install
	install -d debian/pyfr
	install -d debian/pyfr-doc
pybuild --install -i python{version} -p 3.5 --dir . --dest-dir /<<PKGBUILDDIR>>/debian/tmp I: pybuild base:184: /usr/bin/python3 setup.py install --root /<<PKGBUILDDIR>>/debian/tmp --install-lib=/usr/share/pyfr
running install
running build
running build_py
running install_lib
[...]


Is this a bug in pybuild or am I missing something?


Reply to: