Skip to content

python-ligo-lw packaging changes to cover Bullseye (without python2)

The following covers the full set of changes made to the packaging provided with the 1.6.0 tarball:

diff -Nur old/debian/changelog new/debian/changelog
--- old/debian/changelog        2019-06-13 11:42:47.000000000 +0200
+++ new/debian/changelog        2019-11-05 11:37:39.000000000 +0100
@@ -1,3 +1,17 @@
+python-ligo-lw (1.6.0-2.1) unstable; urgency=medium
+
+  * repackaging changes, to build also with python3 only
+
+ -- Steffen Grunewald <steffen.grunewald@ligo.org>  Tue, 05 Nov 2019 11:11:00 +0100
+
+python-ligo-lw (1.6.0-2) unstable; urgency=medium
+
+  * repackaging:
+    move executables into ligo-lw-bin
+    attempt to run tests but ignore outcome
+
+ -- Steffen Grunewald <steffen.grunewald@ligo.org>  Wed, 11 Sep 2019 09:25:00 +0200
+
 python-ligo-lw (1.6.0-1) unstable; urgency=medium
 
   * remove custom ProcessParamsTable from dbtables
diff -Nur old/debian/control new/debian/control
--- old/debian/control  2019-05-31 09:31:21.000000000 +0200
+++ new/debian/control  2019-11-05 11:37:39.000000000 +0100
@@ -5,7 +5,7 @@
 Build-Depends:
  debhelper (>= 9),
  dh-python,
- python-dev,
+ python-all-dev,
  python-ligo-common,
  python-six,
  python3-dev,
@@ -37,13 +37,16 @@
  python-pylal
 Replaces:
  python-glue-ligolw-tools
-Provides:
- python-glue-ligolw-tools
-Description: LIGO Light-Weight XML I/O library
+#Provides:
+# python-glue-ligolw-tools
+# * moved to ligo-lw-bin
+Description: LIGO Light-Weight XML I/O library - Python 2
  The LIGO Light-Weight XML format is used extensively by compact object
  detection pipelines and associate tool sets.  This package provides a
  Python I/O library for reading, writing, and interacting with documents in
  this format.
+ .
+ This package provides the Python2 modules.
 
 Package: python3-ligo-lw
 Architecture: any
@@ -66,10 +69,44 @@
  python3-glue (<< 2.0)
 Replaces:
  python3-glue-ligolw-tools
-Provides:
- python3-glue-ligolw-tools
-Description: LIGO Light-Weight XML I/O library
+#Provides:
+# python3-glue-ligolw-tools
+# * moved to ligo-lw-bin
+Description: LIGO Light-Weight XML I/O library - Python 3
+ The LIGO Light-Weight XML format is used extensively by compact object
+ detection pipelines and associate tool sets.  This package provides a
+ Python I/O library for reading, writing, and interacting with documents in
+ this format.
+ .
+ This package provides the Python3 modules.
+
+Package: ligo-lw-bin
+Architecture: any
+Depends:
+ ${shlibs:Depends},
+ ${misc:Depends},
+ ${python:Depends},
+ python-ligo-lw (= ${binary:Version}),
+ python3-ligo-lw (= ${binary:Version})
+Recommends:
+ python-lalburst,
+ python3-lalburst
+Conflicts:
+ python-glue-ligolw-tools,
+ python-glue (<< 2.0),
+ python-pylal,
+ python-ligo-lw (<< 1.6.0-2)
+Replaces:
+ python-glue-ligolw-tools,
+ python-ligo-lw (<< 1.6.0-2)
+#Provides:
+# python-glue-ligolw-tools,
+# python3-glue-ligolw-tools
+Description: LIGO Light-Weight XML I/O library - Tools
  The LIGO Light-Weight XML format is used extensively by compact object
  detection pipelines and associate tool sets.  This package provides a
  Python I/O library for reading, writing, and interacting with documents in
  this format.
+ .
+ This package provides the executables.
+
diff -Nur old/debian/ligo-lw-bin.install new/debian/ligo-lw-bin.install
--- old/debian/ligo-lw-bin.install      1970-01-01 01:00:00.000000000 +0100
+++ new/debian/ligo-lw-bin.install      2019-09-11 09:15:20.000000000 +0200
@@ -0,0 +1 @@
+usr/bin/*
diff -Nur old/debian/python3-ligo-lw.install new/debian/python3-ligo-lw.install
--- old/debian/python3-ligo-lw.install  2017-03-23 07:14:16.000000000 +0100
+++ new/debian/python3-ligo-lw.install  2019-11-05 11:13:05.000000000 +0100
@@ -1,2 +1 @@
-#usr/bin/*
-usr/lib/python3*/dist-packages/ligo/lw
+usr/lib/python3*/*-packages/ligo/lw
diff -Nur old/debian/python-ligo-lw.install new/debian/python-ligo-lw.install
--- old/debian/python-ligo-lw.install   2017-03-23 07:14:16.000000000 +0100
+++ new/debian/python-ligo-lw.install   2019-11-05 11:12:57.000000000 +0100
@@ -1,2 +1 @@
-usr/bin/*
-usr/lib/python2*/dist-packages/ligo/lw
+usr/lib/python2*/*-packages/ligo/lw
diff -Nur old/debian/rules new/debian/rules
--- old/debian/rules    2019-02-14 18:44:58.000000000 +0100
+++ new/debian/rules    2019-11-05 11:37:39.000000000 +0100
@@ -1,13 +1,22 @@
 #!/usr/bin/make -f
 include /usr/share/dpkg/pkg-info.mk
 
-# Redirect Python 3 packages to a directory that we are going to ignore.
+# Redirect Python 3 packages to a directory that we are going to ignore/use.
 # FIXME: in the future, we could put these in libexec or change their names.
 export PYBUILD_INSTALL_ARGS_python3 := --install-scripts=/dont-install
 
 %:
        dh $@ --with=python2,python3 --buildsystem=pybuild
 
-# do not run tests at all.
+override_dh_auto_install:
+# installs to debian/tmp/
+       dh_auto_install
+# if python2, binaries go to debian/tmp/usr/bin - OK
+# if python3, binaries go to debian/tmp/dont-install (as above) - move them, but don't overwrite
+       mkdir -p $(CURDIR)/debian/tmp/usr/bin
+       mv -n $(CURDIR)/debian/tmp/dont-install/* $(CURDIR)/debian/tmp/usr/bin/ || true
+# now everything is in place for *.install files
+
+# attempt to run tests but ignore outcome
 override_dh_auto_test:
-       true
+       dh_auto_test || true