Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
math/py-ambit: New port: Library for tensor product calculations
- Loading branch information
Showing
6 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1684643393 | ||
SHA256 (jturney-ambit-v0.7_GH0.tar.gz) = 97a4360db5cad6c9d2bc0932fc8641a3feb34a809c192c99886880073e87f8c2 | ||
SIZE (jturney-ambit-v0.7_GH0.tar.gz) = 336129 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Python bindings for the C++ library implementing the tensor product calculations | ||
through a clean, concise user interface. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
%%PYTHON_SITELIBDIR%%/ambit/__init__.py | ||
%%PYTHON_SITELIBDIR%%/ambit/pyambit%%PYTHON_EXT_SUFFIX%%.so |