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

Re: How to split modules in multiple deb packages



[Simone Rossetto, 2017-02-18]
> Hello everybody, I'm packaging a daemon that I've developed in python3 and I
> need to split the core modules in two deb packages, but I don't now how to do
> that.
>
> One of the module is specific for Raspberry Pi, it adds some
> functionalities, but
> the daemon itself doesn't require a Pi hardware and can still do its job
> without that module even on a Pi. What I want to do is to split the modules
> in two deb packages, one with all the modules except rpi.py and one with only
> rpi.py (setting the appropriate dependencies, i.e. python3-gpiozero, etc).
> 
> How can I do that?

you can use this in debian/rules:
("mypackage" is module name which will be shipped in python3-mypackage
binary package and "rpi" or "rpi-daemon" is binary package shipping the daemon)

  export PYBUILD_NAME=mypackage
  override_dh_auto_install:
  	dh_auto_install
	mv debian/python3-mypackage/usr/bin/rpi debian/rpi-daemon/usr/bin/

(add "/usr/bin/" to debian/rpi-daemon.dirs)

> I can exclude rpi.py module from main package and create a
> python3-mypackage.rpi.install

please don't use "python3-" prefix for packages that do not install
files in /usr/lib/python3/dist-packages/

> file installing rpi.py in /usr/lib/python3/mypackage but I don't think it is
> the right way of doing that.

if it's one file only (without private modules) you can install directly
into /usr/bin/
-- 
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: