git: e4464e75cfa6 - main - math/py-ambit: New port: Library for tensor product calculations
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 21 May 2023 06:39:09 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=e4464e75cfa690636b08da956b3e4998c99142e2 commit e4464e75cfa690636b08da956b3e4998c99142e2 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2023-05-21 05:24:34 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2023-05-21 06:39:03 +0000 math/py-ambit: New port: Library for tensor product calculations --- math/Makefile | 1 + math/py-ambit/Makefile | 44 ++++++++++++++++++++++++++++++++ math/py-ambit/distinfo | 3 +++ math/py-ambit/files/patch-CMakeLists.txt | 11 ++++++++ math/py-ambit/pkg-descr | 2 ++ math/py-ambit/pkg-plist | 2 ++ 6 files changed, 63 insertions(+) diff --git a/math/Makefile b/math/Makefile index b7ce4225cd88..70a0b3ede704 100644 --- a/math/Makefile +++ b/math/Makefile @@ -875,6 +875,7 @@ SUBDIR += py-affine SUBDIR += py-algopy SUBDIR += py-altgraph + SUBDIR += py-ambit SUBDIR += py-amply SUBDIR += py-animatplot SUBDIR += py-animatplot-ng diff --git a/math/py-ambit/Makefile b/math/py-ambit/Makefile new file mode 100644 index 000000000000..b7e07dffffdb --- /dev/null +++ b/math/py-ambit/Makefile @@ -0,0 +1,44 @@ +PORTNAME= ambit +DISTVERSIONPREFIX= v +DISTVERSION= 0.7 +CATEGORIES= math +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Library for tensor product calculations +WWW= https://github.com/jturney/ambit + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/../COPYING + +PY_DEPENDS= ${PYNUMPY} +BUILD_DEPENDS= pybind11>0:devel/pybind11 \ + ${PY_DEPENDS} +LIB_DEPENDS= libambit.so:math/ambit \ + libhdf5.so:science/hdf5 \ + libopenblas.so:math/openblas +RUN_DEPENDS= ${PY_DEPENDS} + +USES= cmake compiler:c++17-lang python:build +USE_PYTHON= flavors pytest + +USE_GITHUB= yes +GH_ACCOUNT= jturney + +WRKSRC_SUBDIR= pyambit + +CMAKE_ARGS= -DPYMOD_INSTALL_LIBDIR:STRING=/python${_PYTHON_VERSION}/site-packages \ + -DFREEBSD_PYTHON_VER=${PYTHON_VER} + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} +TEST_WRKSRC= ${WRKSRC} + +post-install: # remove share/cmake/ambit/ambitTargets-Python-%%CMAKE_BUILD_TYPE%%.cmake, and tests + @${RM} -r \ + ${STAGEDIR}${PREFIX}/share \ + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ambit/tests + +pre-test: + @${RM} ${WRKSRC}/__init__.py # tests fail with __init__.py + +.include <bsd.port.mk> diff --git a/math/py-ambit/distinfo b/math/py-ambit/distinfo new file mode 100644 index 000000000000..22974df3fadf --- /dev/null +++ b/math/py-ambit/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1684643393 +SHA256 (jturney-ambit-v0.7_GH0.tar.gz) = 97a4360db5cad6c9d2bc0932fc8641a3feb34a809c192c99886880073e87f8c2 +SIZE (jturney-ambit-v0.7_GH0.tar.gz) = 336129 diff --git a/math/py-ambit/files/patch-CMakeLists.txt b/math/py-ambit/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..fff0caf40101 --- /dev/null +++ b/math/py-ambit/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2023-05-21 04:59:24 UTC ++++ CMakeLists.txt +@@ -23,7 +23,7 @@ set(CMAKECONFIG_INSTALL_DIR "${ambit_INSTALL_CMAKEDIR} + + #if (NOT TARGET Python::Module) + set(Python_ADDITIONAL_VERSIONS 3.11 3.10 3.9 3.8 3.7) # adjust with CMake minimum FindPythonInterp +- find_package(Python 3.7 COMPONENTS Interpreter Development NumPy REQUIRED) ++ find_package(Python ${FREEBSD_PYTHON_VER} EXACT COMPONENTS Interpreter Development NumPy REQUIRED) + message(STATUS "Found Python ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}: ${Python_EXECUTABLE} (found version ${Python_VERSION})") + #endif() + diff --git a/math/py-ambit/pkg-descr b/math/py-ambit/pkg-descr new file mode 100644 index 000000000000..eb77d7758b8e --- /dev/null +++ b/math/py-ambit/pkg-descr @@ -0,0 +1,2 @@ +Python bindings for the C++ library implementing the tensor product calculations +through a clean, concise user interface. diff --git a/math/py-ambit/pkg-plist b/math/py-ambit/pkg-plist new file mode 100644 index 000000000000..e0963c5099d4 --- /dev/null +++ b/math/py-ambit/pkg-plist @@ -0,0 +1,2 @@ +%%PYTHON_SITELIBDIR%%/ambit/__init__.py +%%PYTHON_SITELIBDIR%%/ambit/pyambit%%PYTHON_EXT_SUFFIX%%.so