diff -Nru gudhi-3.2.0+dfsg/debian/changelog gudhi-3.2.0+dfsg/debian/changelog --- gudhi-3.2.0+dfsg/debian/changelog 2020-06-29 11:40:18.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/changelog 2020-07-10 09:14:03.000000000 +0000 @@ -1,3 +1,22 @@ +gudhi (3.2.0+dfsg-4) unstable; urgency=medium + + * Re-enable build-time tests on s390x, no longer failing. + * Simplify autopkgtesting. + * Demote matplotlib and POT to recommends for python3-gudhi. + * Demote libhera-dev to suggests for libgudhi-dev. + + -- Gard Spreemann Fri, 10 Jul 2020 11:14:03 +0200 + +gudhi (3.2.0+dfsg-3) unstable; urgency=medium + + * Enable Wasserstein Python module. (Closes: #949475) + - Depend on python3-pot. + - Drop corresponding patch. + - Don't blacklist Wasserstein tests anymore. + * Recommend POT, SciPy and scikit-learn. + + -- Gard Spreemann Wed, 08 Jul 2020 21:32:32 +0200 + gudhi (3.2.0+dfsg-2) unstable; urgency=medium * Add patch 0010-Work-around-963955.patch to work around FTBFS with diff -Nru gudhi-3.2.0+dfsg/debian/control gudhi-3.2.0+dfsg/debian/control --- gudhi-3.2.0+dfsg/debian/control 2020-06-29 11:40:18.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/control 2020-07-10 09:09:59.000000000 +0000 @@ -23,9 +23,13 @@ pybind11-dev, python3-all-dev, python3-matplotlib, + python3-numpy, + python3-pot, python3-pybind11, python3-pytest, + python3-scipy, python3-setuptools, + python3-sklearn, python3-tk, qtbase5-dev Build-Depends-Indep: doxygen, @@ -41,17 +45,14 @@ Multi-Arch: foreign Depends: libboost-chrono-dev (>= 1.56), libboost-filesystem-dev (>= 1.56), - libboost-program-options-dev (>= 1.56), libboost-system-dev (>= 1.56), - libboost-test-dev (>= 1.56), libboost-timer-dev (>= 1.56), libcgal-dev (>= 5.0), libeigen3-dev (>= 3.1.0), libgmp-dev (>= 4.2), - libhera-dev, libtbb-dev, ${misc:Depends} -Suggests: libgudhi-doc, libgudhi-examples +Suggests: libgudhi-doc, libgudhi-examples, libhera-dev Description: Generic open source C++ library for topological data analysis The GUDHI library is a generic open source C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry @@ -59,9 +60,6 @@ and algorithms to construct simplicial complexes and compute persistent homology. . - The GUDHI library is developed as part of the GUDHI project supported - by the European Research Council. - . This package contains the header files. See the libgudhi-examples package for example programs using the library. @@ -78,9 +76,6 @@ and algorithms to construct simplicial complexes and compute persistent homology. . - The GUDHI library is developed as part of the GUDHI project supported - by the European Research Council. - . This package contains some source code examples. Package: libgudhi-doc @@ -95,19 +90,16 @@ and algorithms to construct simplicial complexes and compute persistent homology. . - The GUDHI library is developed as part of the GUDHI project supported - by the European Research Council. - . This package contains documentation. Package: python3-gudhi Section: python Architecture: amd64 arm64 i386 mips64el ppc64el s390x ia64 ppc64 riscv64 sparc64 x32 -Depends: python3-matplotlib, - python3-tk, - ${misc:Depends}, - ${python3:Depends}, - ${shlibs:Depends} +Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends} +Recommends: python3-matplotlib, + python3-pot, + python3-scipy, + python3-sklearn Description: Python 3 interface to the GUDHI library The GUDHI library is a generic open source C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry @@ -115,9 +107,6 @@ and algorithms to construct simplicial complexes and compute persistent homology. . - The GUDHI library is developed as part of the GUDHI project supported - by the European Research Council. - . This package contains GUDHI's Python (3) interface. Package: gudhui @@ -131,9 +120,6 @@ and algorithms to construct simplicial complexes and compute persistent homology. . - The GUDHI library is developed as part of the GUDHI project supported - by the European Research Council. - . This package contains GudhUI, a graphical interface to a few of GUDHI's features. Be aware that it is quite rough around the edges. @@ -148,8 +134,5 @@ and algorithms to construct simplicial complexes and compute persistent homology. . - The GUDHI library is developed as part of the GUDHI project supported - by the European Research Council. - . This package contains some utilities built with the GUDHI library. diff -Nru gudhi-3.2.0+dfsg/debian/patches/0009-Keep-POT-optional.patch gudhi-3.2.0+dfsg/debian/patches/0009-Keep-POT-optional.patch --- gudhi-3.2.0+dfsg/debian/patches/0009-Keep-POT-optional.patch 2020-06-29 11:39:12.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/patches/0009-Keep-POT-optional.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -From: Gard Spreemann -Date: Thu, 4 Jun 2020 14:37:55 +0200 -Subject: Keep POT optional. - ---- - src/python/gudhi/wasserstein/barycenter.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/python/gudhi/wasserstein/barycenter.py b/src/python/gudhi/wasserstein/barycenter.py -index d67bcde..e376ecc 100644 ---- a/src/python/gudhi/wasserstein/barycenter.py -+++ b/src/python/gudhi/wasserstein/barycenter.py -@@ -8,7 +8,10 @@ - # - YYYY/MM Author: Description of the modification - - --import ot -+try: -+ import ot -+except ImportError: -+ print("POT (Python Optimal Transport) package is not installed.") - import numpy as np - import scipy.spatial.distance as sc - diff -Nru gudhi-3.2.0+dfsg/debian/patches/0009-Work-around-963955.patch gudhi-3.2.0+dfsg/debian/patches/0009-Work-around-963955.patch --- gudhi-3.2.0+dfsg/debian/patches/0009-Work-around-963955.patch 1970-01-01 00:00:00.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/patches/0009-Work-around-963955.patch 2020-07-08 19:31:23.000000000 +0000 @@ -0,0 +1,120 @@ +From: Gard Spreemann +Date: Mon, 29 Jun 2020 13:37:10 +0200 +Subject: Work around #963955. + +This works around a bug in Qt 5.14.x causing any software using TBB +together with Qt to FTBFS. It is fixed upstream in 5.15.1. +--- + src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h | 2 ++ + src/Bottleneck_distance/include/gudhi/Persistence_graph.h | 2 ++ + src/Hasse_complex/include/gudhi/Hasse_complex.h | 2 ++ + src/Nerve_GIC/include/gudhi/GIC.h | 2 ++ + src/Simplex_tree/include/gudhi/Simplex_tree.h | 2 ++ + src/Tangential_complex/benchmark/benchmark_tc.cpp | 2 ++ + src/Tangential_complex/include/gudhi/Tangential_complex.h | 2 ++ + 7 files changed, 14 insertions(+) + +diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h +index aa255ec..ae29f6c 100644 +--- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h ++++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h +@@ -15,8 +15,10 @@ + #include + + #ifdef GUDHI_USE_TBB ++#ifndef Q_MOC_RUN + #include + #endif ++#endif + + #include + #include // for pair<> +diff --git a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h +index e1e3522..b865681 100644 +--- a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h ++++ b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h +@@ -14,8 +14,10 @@ + #include + + #ifdef GUDHI_USE_TBB ++#ifndef Q_MOC_RUN + #include + #endif ++#endif + + #include + #include +diff --git a/src/Hasse_complex/include/gudhi/Hasse_complex.h b/src/Hasse_complex/include/gudhi/Hasse_complex.h +index 8ce8c36..4842cc2 100644 +--- a/src/Hasse_complex/include/gudhi/Hasse_complex.h ++++ b/src/Hasse_complex/include/gudhi/Hasse_complex.h +@@ -21,8 +21,10 @@ + #include // for infinity value + + #ifdef GUDHI_USE_TBB ++#ifndef Q_MOC_RUN + #include + #endif ++#endif + + namespace Gudhi { + +diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h +index 1b1f932..653501c 100644 +--- a/src/Nerve_GIC/include/gudhi/GIC.h ++++ b/src/Nerve_GIC/include/gudhi/GIC.h +@@ -13,7 +13,9 @@ + #define GIC_H_ + + #ifdef GUDHI_USE_TBB ++#ifndef Q_MOC_RUN + #include ++#endif + #include + #endif + +diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h +index 889dbd0..ac64650 100644 +--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h ++++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h +@@ -27,8 +27,10 @@ + #include + + #ifdef GUDHI_USE_TBB ++#ifndef Q_MOC_RUN + #include + #endif ++#endif + + #include + #include +diff --git a/src/Tangential_complex/benchmark/benchmark_tc.cpp b/src/Tangential_complex/benchmark/benchmark_tc.cpp +index e3b2a04..3e5227a 100644 +--- a/src/Tangential_complex/benchmark/benchmark_tc.cpp ++++ b/src/Tangential_complex/benchmark/benchmark_tc.cpp +@@ -48,8 +48,10 @@ const std::size_t ONLY_LOAD_THE_FIRST_N_POINTS = 20000000; + #include // for std::sqrt + + #ifdef GUDHI_USE_TBB ++#ifndef Q_MOC_RUN + #include + #endif ++#endif + #include "XML_exporter.h" + #include "RIB_exporter.h" + #define GUDHI_TC_EXPORT_PERFORMANCE_DATA +diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex.h +index f007bdd..e49261e 100644 +--- a/src/Tangential_complex/include/gudhi/Tangential_complex.h ++++ b/src/Tangential_complex/include/gudhi/Tangential_complex.h +@@ -58,8 +58,10 @@ + #include // for std::size_t + + #ifdef GUDHI_USE_TBB ++#ifndef Q_MOC_RUN + #include + #include ++#endif + #include + #endif + diff -Nru gudhi-3.2.0+dfsg/debian/patches/0010-Work-around-963955.patch gudhi-3.2.0+dfsg/debian/patches/0010-Work-around-963955.patch --- gudhi-3.2.0+dfsg/debian/patches/0010-Work-around-963955.patch 2020-06-29 11:39:12.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/patches/0010-Work-around-963955.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -From: Gard Spreemann -Date: Mon, 29 Jun 2020 13:37:10 +0200 -Subject: Work around #963955. - -This works around a bug in Qt 5.14.x causing any software using TBB -together with Qt to FTBFS. It is fixed upstream in 5.15.1. ---- - src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h | 2 ++ - src/Bottleneck_distance/include/gudhi/Persistence_graph.h | 2 ++ - src/Hasse_complex/include/gudhi/Hasse_complex.h | 2 ++ - src/Nerve_GIC/include/gudhi/GIC.h | 2 ++ - src/Simplex_tree/include/gudhi/Simplex_tree.h | 2 ++ - src/Tangential_complex/benchmark/benchmark_tc.cpp | 2 ++ - src/Tangential_complex/include/gudhi/Tangential_complex.h | 2 ++ - 7 files changed, 14 insertions(+) - -diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h -index aa255ec..ae29f6c 100644 ---- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h -+++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h -@@ -15,8 +15,10 @@ - #include - - #ifdef GUDHI_USE_TBB -+#ifndef Q_MOC_RUN - #include - #endif -+#endif - - #include - #include // for pair<> -diff --git a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h -index e1e3522..b865681 100644 ---- a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h -+++ b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h -@@ -14,8 +14,10 @@ - #include - - #ifdef GUDHI_USE_TBB -+#ifndef Q_MOC_RUN - #include - #endif -+#endif - - #include - #include -diff --git a/src/Hasse_complex/include/gudhi/Hasse_complex.h b/src/Hasse_complex/include/gudhi/Hasse_complex.h -index 8ce8c36..4842cc2 100644 ---- a/src/Hasse_complex/include/gudhi/Hasse_complex.h -+++ b/src/Hasse_complex/include/gudhi/Hasse_complex.h -@@ -21,8 +21,10 @@ - #include // for infinity value - - #ifdef GUDHI_USE_TBB -+#ifndef Q_MOC_RUN - #include - #endif -+#endif - - namespace Gudhi { - -diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h -index 1b1f932..653501c 100644 ---- a/src/Nerve_GIC/include/gudhi/GIC.h -+++ b/src/Nerve_GIC/include/gudhi/GIC.h -@@ -13,7 +13,9 @@ - #define GIC_H_ - - #ifdef GUDHI_USE_TBB -+#ifndef Q_MOC_RUN - #include -+#endif - #include - #endif - -diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h -index 889dbd0..ac64650 100644 ---- a/src/Simplex_tree/include/gudhi/Simplex_tree.h -+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h -@@ -27,8 +27,10 @@ - #include - - #ifdef GUDHI_USE_TBB -+#ifndef Q_MOC_RUN - #include - #endif -+#endif - - #include - #include -diff --git a/src/Tangential_complex/benchmark/benchmark_tc.cpp b/src/Tangential_complex/benchmark/benchmark_tc.cpp -index e3b2a04..3e5227a 100644 ---- a/src/Tangential_complex/benchmark/benchmark_tc.cpp -+++ b/src/Tangential_complex/benchmark/benchmark_tc.cpp -@@ -48,8 +48,10 @@ const std::size_t ONLY_LOAD_THE_FIRST_N_POINTS = 20000000; - #include // for std::sqrt - - #ifdef GUDHI_USE_TBB -+#ifndef Q_MOC_RUN - #include - #endif -+#endif - #include "XML_exporter.h" - #include "RIB_exporter.h" - #define GUDHI_TC_EXPORT_PERFORMANCE_DATA -diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex.h -index f007bdd..e49261e 100644 ---- a/src/Tangential_complex/include/gudhi/Tangential_complex.h -+++ b/src/Tangential_complex/include/gudhi/Tangential_complex.h -@@ -58,8 +58,10 @@ - #include // for std::size_t - - #ifdef GUDHI_USE_TBB -+#ifndef Q_MOC_RUN - #include - #include -+#endif - #include - #endif - diff -Nru gudhi-3.2.0+dfsg/debian/patches/series gudhi-3.2.0+dfsg/debian/patches/series --- gudhi-3.2.0+dfsg/debian/patches/series 2020-06-29 11:39:12.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/patches/series 2020-07-08 19:31:23.000000000 +0000 @@ -6,5 +6,4 @@ 0006-Install-Python-module-in-correct-location.patch 0007-Move-towards-reproducible-builds.patch 0008-Don-t-try-to-install-Hera.patch -0009-Keep-POT-optional.patch -0010-Work-around-963955.patch +0009-Work-around-963955.patch diff -Nru gudhi-3.2.0+dfsg/debian/rules gudhi-3.2.0+dfsg/debian/rules --- gudhi-3.2.0+dfsg/debian/rules 2020-06-29 11:40:18.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/rules 2020-07-09 20:12:17.000000000 +0000 @@ -30,8 +30,7 @@ endif # Disable tests on i386 due to rounding problem in some. See upstream GitHub issue #118. -# Disable tests on s390x, as a few are broken. See #943384. -ifneq (, $(filter $(shell dpkg-architecture --query DEB_BUILD_ARCH),i386 s390x x32)) +ifneq (, $(filter $(shell dpkg-architecture --query DEB_BUILD_ARCH),i386 x32)) export DEB_BUILD_MAINT_OPTIONS := $(DEB_BUILD_MAINT_OPTIONS) nocheck endif diff -Nru gudhi-3.2.0+dfsg/debian/tests/control gudhi-3.2.0+dfsg/debian/tests/control --- gudhi-3.2.0+dfsg/debian/tests/control 2020-06-06 14:45:12.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/tests/control 2020-07-10 09:14:03.000000000 +0000 @@ -1,3 +1,3 @@ Tests: python-upstream.sh -Depends: python3-all, python3-gudhi, python3-pytest, python3-scipy, python3-sklearn +Depends: python3-all, python3-gudhi, python3-matplotlib, python3-pot, python3-pytest, python3-scipy, python3-sklearn, python3-tk Restrictions: allow-stderr \ No newline at end of file diff -Nru gudhi-3.2.0+dfsg/debian/tests/python-upstream.sh gudhi-3.2.0+dfsg/debian/tests/python-upstream.sh --- gudhi-3.2.0+dfsg/debian/tests/python-upstream.sh 2020-06-06 14:45:12.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/tests/python-upstream.sh 2020-07-10 09:14:03.000000000 +0000 @@ -5,11 +5,16 @@ helper=$PWD/debian/tests/upstream.py testdir=$PWD/src/python/test +cp $helper $AUTOPKGTEST_TMP +cp -R $testdir $AUTOPKGTEST_TMP cd $AUTOPKGTEST_TMP +rm -f test/test_dtm.py # Imports torch too early. + for py3ver in $(py3versions -vs) do echo "Running tests with Python ${py3ver}." - /usr/bin/python${py3ver} -B $helper $testdir + /usr/bin/python${py3ver} -B upstream.py test + rm -rf .pytest_cache echo "**********" done diff -Nru gudhi-3.2.0+dfsg/debian/tests/upstream.py gudhi-3.2.0+dfsg/debian/tests/upstream.py --- gudhi-3.2.0+dfsg/debian/tests/upstream.py 2020-06-06 14:45:12.000000000 +0000 +++ gudhi-3.2.0+dfsg/debian/tests/upstream.py 2020-07-10 09:14:03.000000000 +0000 @@ -1,42 +1,19 @@ -import importlib -import os import sys +import itertools +import pytest -blacklist = {"test_wasserstein_distance", "test_wasserstein_barycenter", "test_knn", "test_subsampling", "test_representations", "test_dtm"} +blacklist = ["test_dtm.py", # Requires hnswlib + "test_knn.py", # Requires pykeops + "test_representations.py", # Look into this + "test_wasserstein_distance.py::test_wasserstein_distance_pot", # Requires eagerpy. + "test_wasserstein_distance.py::test_wasserstein_distance_grad" # Requires eagerpy. + ] -testdir = sys.argv[1] -sys.path.append(testdir) - -results = [] -with os.scandir(testdir) as it: - for entry in it: - if entry.is_file() and entry.name.startswith("test_") and entry.name.endswith(".py"): - name = entry.name[:-3] +print("Blacklist: %s" %(str(blacklist))) - if name in blacklist: - print("Skipping tests in %s due to blacklist." %(name)) - else: - print("Running tests from %s." %(name)) - - module = importlib.import_module(name) +testdir = sys.argv[1] - tests = [f for f in dir(module) if str(f).startswith("test_")] - for t in tests: - func = getattr(module, t) - if callable(func): - print(" ", t) - ok = True - try: - func() - except AssertionError: - ok = False - if ok: - print(" OK!") - else: - print(" FAIL!") - results.append(ok) +deselect_args = list(itertools.chain.from_iterable([["--deselect", "%s/%s" %(testdir, exclude)] for exclude in blacklist])) -if all(results): - exit(0) -else: - exit(1) +exitcode = pytest.main([testdir] + deselect_args) +exit(exitcode)