From 72c35697e940fe87a02ae01fffb041d709d62527 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Thu, 4 Jun 2020 14:39:22 +0200 Subject: Add new patches. Both fix issues that should be handled upstream soon. --- .../patches/0008-Don-t-try-to-install-Hera.patch | 22 ++++++++++++++++++++ debian/patches/0009-Keep-POT-optional.patch | 24 ++++++++++++++++++++++ debian/patches/series | 2 ++ 3 files changed, 48 insertions(+) create mode 100644 debian/patches/0008-Don-t-try-to-install-Hera.patch create mode 100644 debian/patches/0009-Keep-POT-optional.patch 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 +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 +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 -- cgit v1.2.3