From 43aaa3da51895fb3a8cf04fce5c1a6cbe083a779 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Wed, 8 Jul 2020 21:34:45 +0200 Subject: Enable Wasserstein Python module. --- debian/changelog | 8 ++ debian/control | 1 + debian/patches/0009-Keep-POT-optional.patch | 24 ------ debian/patches/0009-Work-around-963955.patch | 120 +++++++++++++++++++++++++++ debian/patches/0010-Work-around-963955.patch | 120 --------------------------- debian/patches/series | 3 +- 6 files changed, 130 insertions(+), 146 deletions(-) delete mode 100644 debian/patches/0009-Keep-POT-optional.patch create mode 100644 debian/patches/0009-Work-around-963955.patch delete mode 100644 debian/patches/0010-Work-around-963955.patch (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f97fba48..32c44b66 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +gudhi (3.2.0+dfsg-3) UNRELEASED; urgency=medium + + * Enable Wasserstein Python module. (Closes: #949475) + - Depend on python3-pot. + - Drop corresponding patch. + + -- 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 --git a/debian/control b/debian/control index 184cd65b..1785c702 100644 --- a/debian/control +++ b/debian/control @@ -23,6 +23,7 @@ Build-Depends: cmake (>= 3.1), pybind11-dev, python3-all-dev, python3-matplotlib, + python3-pot, python3-pybind11, python3-pytest, python3-setuptools, diff --git a/debian/patches/0009-Keep-POT-optional.patch b/debian/patches/0009-Keep-POT-optional.patch deleted file mode 100644 index 0324551a..00000000 --- a/debian/patches/0009-Keep-POT-optional.patch +++ /dev/null @@ -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 --git a/debian/patches/0009-Work-around-963955.patch b/debian/patches/0009-Work-around-963955.patch new file mode 100644 index 00000000..76eeb500 --- /dev/null +++ b/debian/patches/0009-Work-around-963955.patch @@ -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 --git a/debian/patches/0010-Work-around-963955.patch b/debian/patches/0010-Work-around-963955.patch deleted file mode 100644 index 76eeb500..00000000 --- a/debian/patches/0010-Work-around-963955.patch +++ /dev/null @@ -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 --git a/debian/patches/series b/debian/patches/series index 80880a58..ee37db40 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 -- cgit v1.2.3