Bug#942882: moving things around with PYBUILD_EXT_DESTDIR_* doesn't seem to work

2022-08-18 Thread Stefano Rivera
Hi Matthias (2019.10.22_20:54:04_+0200)
> The handling of the changed extension names in 3.8 is a little bit tricky,
> and you suggested to use PYBUILD_NAME and PYBUILD_EXT_DESTDIR_*.  Here is a
> try to do that The changed packaging has other bugs, but it show that the
> extensions are not moved into the -lib packages.

From what I can see, PYBUILD_NAME effectively overrides
PYBUILD_EXT_DESTDIR. It should probably be the other way around.

At the moment, this does work:

export PYBUILD_DESTDIR_python3=debian/python3-tables
export PYBUILD_EXT_DESTDIR_python3=debian/python3-tables-lib

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272



Bug#942882: moving things around with PYBUILD_EXT_DESTDIR_* doesn't seem to work

2019-10-22 Thread Matthias Klose

Package: dh-python
Version: 4.20191017

The handling of the changed extension names in 3.8 is a little bit tricky, and 
you suggested to use PYBUILD_NAME and PYBUILD_EXT_DESTDIR_*.  Here is a try to 
do that The changed packaging has other bugs, but it show that the extensions 
are not moved into the -lib packages.
diff -Nru pytables-3.5.2/debian/changelog pytables-3.5.2/debian/changelog
--- pytables-3.5.2/debian/changelog	2019-08-16 19:53:28.0 +0200
+++ pytables-3.5.2/debian/changelog	2019-10-22 13:04:06.0 +0200
@@ -1,3 +1,25 @@
+pytables (3.5.2-3ubuntu2) UNRELEASED; urgency=medium
+
+  [ Michael Hudson-Doyle ]
+  * Fix build with Python 3.8 in a way that does not break Python 2.7. 
+
+  [ Matthias Klose ]
+  * Fix installation of Python 3.8 extensions.
+
+ -- Matthias Klose   Tue, 22 Oct 2019 13:04:06 +0200
+
+pytables (3.5.2-3ubuntu1) focal; urgency=medium
+
+  * Fix build with Python3.8.
+
+ -- Matthias Klose   Mon, 21 Oct 2019 11:25:19 +0200
+
+pytables (3.5.2-3build1) focal; urgency=medium
+
+  * No-change rebuild to build with python3.8.
+
+ -- Matthias Klose   Fri, 18 Oct 2019 18:33:41 +
+
 pytables (3.5.2-3) unstable; urgency=medium
 
   * debian/rules:
diff -Nru pytables-3.5.2/debian/control pytables-3.5.2/debian/control
--- pytables-3.5.2/debian/control	2019-08-16 19:53:28.0 +0200
+++ pytables-3.5.2/debian/control	2019-10-22 13:04:06.0 +0200
@@ -1,5 +1,6 @@
 Source: pytables
-Maintainer: Debian Science Maintainers 
+Maintainer: Ubuntu Developers 
+XSBC-Original-Maintainer: Debian Science Maintainers 
 Uploaders: Antonio Valentino ,
Yaroslav Halchenko 
 Section: python
diff -Nru pytables-3.5.2/debian/patches/python3.8-fix.diff pytables-3.5.2/debian/patches/python3.8-fix.diff
--- pytables-3.5.2/debian/patches/python3.8-fix.diff	1970-01-01 01:00:00.0 +0100
+++ pytables-3.5.2/debian/patches/python3.8-fix.diff	2019-10-22 13:04:06.0 +0200
@@ -0,0 +1,51 @@
+--- a/tables/index.py
 b/tables/index.py
+@@ -23,7 +23,11 @@
+ import tempfile
+ import warnings
+ 
+-from time import time, clock
++from time import time
++try:
++from time import perf_counter
++except ImportError:
++from time import clock
+ 
+ import numpy
+ 
+@@ -847,7 +851,7 @@
+ 
+ if self.verbose:
+ t1 = time()
+-c1 = clock()
++c1 = perf_counter()
+ ss = self.slicesize
+ tmp = self.tmp
+ ranges = tmp.ranges[:]
+@@ -953,7 +957,7 @@
+ self.compute_overlaps(self.tmp, "do_complete_sort()", self.verbose)
+ if self.verbose:
+ t = round(time() - t1, 4)
+-c = round(clock() - c1, 4)
++c = round(perf_counter() - c1, 4)
+ print("time: %s. clock: %s" % (t, c))
+ 
+ def swap(self, what, mode=None):
+@@ -968,7 +972,7 @@
+ 
+ if self.verbose:
+ t1 = time()
+-c1 = clock()
++c1 = perf_counter()
+ if what == "chunks":
+ self.swap_chunks(mode)
+ elif what == "slices":
+@@ -982,7 +986,7 @@
+ rmult = len(mult.nonzero()[0]) / float(len(mult))
+ if self.verbose:
+ t = round(time() - t1, 4)
+-c = round(clock() - c1, 4)
++c = round(perf_counter() - c1, 4)
+ print("time: %s. clock: %s" % (t, c))
+ # Check that entropy is actually decreasing
+ if what == "chunks" and self.last_tover > 0. and self.last_nover > 0:
diff -Nru pytables-3.5.2/debian/patches/series pytables-3.5.2/debian/patches/series
--- pytables-3.5.2/debian/patches/series	2019-08-16 19:53:28.0 +0200
+++ pytables-3.5.2/debian/patches/series	2019-10-21 11:24:20.0 +0200
@@ -4,3 +4,4 @@
 0004-remove-gtags.patch
 0005-Drop-mock-for-requirements.txt.patch
 0006-Skip-index-backcompat-tests-on-bingendian.patch
+python3.8-fix.diff
diff -Nru pytables-3.5.2/debian/python3-tables-dbg.install pytables-3.5.2/debian/python3-tables-dbg.install
--- pytables-3.5.2/debian/python3-tables-dbg.install	2019-08-16 19:53:28.0 +0200
+++ pytables-3.5.2/debian/python3-tables-dbg.install	1970-01-01 01:00:00.0 +0100
@@ -1 +0,0 @@
-usr/lib/python3*/*-packages/tables/*.cpython-3?dm*.so
diff -Nru pytables-3.5.2/debian/python3-tables.install pytables-3.5.2/debian/python3-tables.install
--- pytables-3.5.2/debian/python3-tables.install	2019-08-16 19:53:28.0 +0200
+++ pytables-3.5.2/debian/python3-tables.install	1970-01-01 01:00:00.0 +0100
@@ -1,8 +0,0 @@
-usr/lib/python3*/dist-packages/tables/*.py
-usr/lib/python3*/dist-packages/tables/misc/*.py
-usr/lib/python3*/dist-packages/tables/nodes/*.py
-usr/lib/python3*/dist-packages/tables/nodes/tests/*.py
-usr/lib/python3*/dist-packages/tables/scripts/*.py
-usr/lib/python3*/dist-packages/tables/tests/*.py
-usr/lib/python3*/dist-packages/tables*.egg-info
-usr/bin/*
diff -Nru pytables-3.5.2/debian/python3-tables-lib.install pytables-3.5.2/debian/python3-tables-lib.install
---