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

Re: Specifying ‘--install-data’ for each binary package



[Ben Finney, 2013-09-02]
> PYTHON2_PACKAGE_NAME = python-coverage
> PYTHON3_PACKAGE_NAME = python3-coverage
> PYTHON2 = $(shell pyversions -vr)
> PYTHON3 = $(shell py3versions -vr)
> […]
> 
> .PHONY: install-python%
> install-python%: PACKAGE_NAME=$(if $(findstr ${PYTHON3},%),${PYTHON3_PACKAGE_NAME},${PYTHON2_PACKAGE_NAME})
> install-python%:
>         python$* setup.py install --install-layout=deb \
>             --install-data=debian/${PACKAGE_NAME}/usr/share/${PACKAGE_NAME} \

              --install-data=/usr/share/${PACKAGE_NAME} \

>             --root=$(CURDIR)/debian/tmp

              --root=$(CURDIR)/debian/${PACKAGE_NAME}

> Before I spend more time on this method, am I missing some Debhelper
> option that can do the right thing for ‘--install-data’? Or some other
> Debian practice that makes it easy to handle arch-independent files for
> Python?

| #! /usr/bin/make -f
| export PYBUILD_NAME=coverage
| export PYBUILD_INSTALL_ARGS=--install-data=/usr/share/{package}/
| %:
|       dh $@ --with python2,python3 --buildsystem=pybuild

the only problem is... you need to wait for next dh-python release.
I introduced Interpreter.suggest_pkg_name method (which generates what you
want) in yesterday's upload, but I use it only to guess DESTDIR, it's not
exposed yet.
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


Reply to: