Skip to content

Commit

Permalink
math/py-dionysus: FIx build failure with clang-18; Add tests
Browse files Browse the repository at this point in the history
Reported by:	fallout
  • Loading branch information
yurivict committed Apr 12, 2024
1 parent 883d41c commit e51da61
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
6 changes: 5 additions & 1 deletion math/py-dionysus/Makefile
Expand Up @@ -14,11 +14,15 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt

BUILD_DEPENDS= ${LOCALBASE}/include/boost/range/adaptors.hpp:devel/boost-libs

USES= cmake python
USES= cmake compiler:c++14-lang python
USE_PYTHON= flavors pytest # 1 test fails, see https://github.com/mrzv/dionysus/issues/64, another one loops forever

CMAKE_ARGS= -DPython_EXECUTABLE:STRING=${PYTHON_CMD}
CMAKE_OFF= build_examples

TEST_WRKSRC= ${WRKSRC}/tests
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}

PLIST_FILES= ${PYTHON_SITELIBDIR}/dionysus/__init__.py \
${PYTHON_SITELIBDIR}/dionysus/_dionysus${PYTHON_EXT_SUFFIX}.so \
${PYTHON_SITELIBDIR}/dionysus/_version.py \
Expand Down
13 changes: 13 additions & 0 deletions math/py-dionysus/files/patch-bindings_python_boundary.cpp
@@ -0,0 +1,13 @@
- workaround for https://github.com/mrzv/dionysus/issues/63

--- bindings/python/boundary.cpp.orig 2024-04-12 03:21:33 UTC
+++ bindings/python/boundary.cpp
@@ -68,7 +68,7 @@ PyMatrixFiltration coboundary(const PyFiltration& f)
return Entry(ee, f.index(e.index()));
}))
{
- m.column(n - 1 - x.index()).emplace_back(Entry { x.element(), n - 1 - i });
+ m.column(n - 1 - x.index()).emplace_back(Entry { x.element(), (unsigned int)(n - 1 - i) });
}
++i;
}

0 comments on commit e51da61

Please sign in to comment.