summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2020-06-04 14:39:22 +0200
committerGard Spreemann <gspr@nonempty.org>2020-06-04 14:39:22 +0200
commit72c35697e940fe87a02ae01fffb041d709d62527 (patch)
tree15f5123b1d681366ae49cdab7249d94af96873bb
parent66db3d32c651d7b4b9643988be75cf445cefbd2c (diff)
Add new patches. Both fix issues that should be handled upstream soon.
-rw-r--r--debian/patches/0008-Don-t-try-to-install-Hera.patch22
-rw-r--r--debian/patches/0009-Keep-POT-optional.patch24
-rw-r--r--debian/patches/series2
3 files changed, 48 insertions, 0 deletions
diff --git a/debian/patches/0008-Don-t-try-to-install-Hera.patch b/debian/patches/0008-Don-t-try-to-install-Hera.patch
new file mode 100644
index 00000000..c498e81a
--- /dev/null
+++ b/debian/patches/0008-Don-t-try-to-install-Hera.patch
@@ -0,0 +1,22 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Thu, 4 Jun 2020 14:36:26 +0200
+Subject: Don't try to install Hera.
+
+We use the system version.
+---
+ src/cmake/modules/GUDHI_user_version_target.cmake | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/cmake/modules/GUDHI_user_version_target.cmake b/src/cmake/modules/GUDHI_user_version_target.cmake
+index 9cf648e..321f49d 100644
+--- a/src/cmake/modules/GUDHI_user_version_target.cmake
++++ b/src/cmake/modules/GUDHI_user_version_target.cmake
+@@ -58,8 +58,6 @@ add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
+ add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
+ copy_directory ${CMAKE_SOURCE_DIR}/src/GudhUI ${GUDHI_USER_VERSION_DIR}/GudhUI)
+
+-add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
+- copy_directory ${CMAKE_SOURCE_DIR}/ext/hera/wasserstein/include ${GUDHI_USER_VERSION_DIR}/ext/hera/wasserstein/include)
+
+ set(GUDHI_DIRECTORIES "doc;example;concept;utilities")
+
diff --git a/debian/patches/0009-Keep-POT-optional.patch b/debian/patches/0009-Keep-POT-optional.patch
new file mode 100644
index 00000000..0324551a
--- /dev/null
+++ b/debian/patches/0009-Keep-POT-optional.patch
@@ -0,0 +1,24 @@
+From: Gard Spreemann <gspr@nonempty.org>
+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/series b/debian/patches/series
index adeb35f7..ba323276 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,5 @@
0005-Disable-Sphinx.patch
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