Skip to content

Commit

Permalink
math/xtensor-python: New port: Python bindings for xtensor
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict committed Nov 27, 2021
1 parent dd402e3 commit 9320013
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions math/Makefile
Expand Up @@ -1077,6 +1077,7 @@
SUBDIR += xtensor
SUBDIR += xtensor-blas
SUBDIR += xtensor-io
SUBDIR += xtensor-python
SUBDIR += yacas
SUBDIR += yices
SUBDIR += z3
Expand Down
35 changes: 35 additions & 0 deletions math/xtensor-python/Makefile
@@ -0,0 +1,35 @@
PORTNAME= xtensor-python
DISTVERSION= 0.26.0
CATEGORIES= math python

MAINTAINER= yuri@FreeBSD.org
COMMENT= Python bindings for xtensor # it is called "bindings" but it doesn't install python modules, it's rather a header-only library to use xtensor from python extensions

LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

HPP_DEPENDS= xtensor>0:math/xtensor \
pybind11>0:devel/pybind11 \
${PYNUMPY}
BUILD_DEPENDS= ${HPP_DEPENDS}
RUN_DEPENDS= ${HPP_DEPENDS}
TEST_DEPENDS= googletest>0:devel/googletest \
pybind11>0:devel/pybind11

USES= cmake compiler:c++14-lang python

USE_GITHUB= yes
GH_ACCOUNT= xtensor-stack

CXXFLAGS+= -I${PYTHON_INCLUDEDIR} -I${PYTHON_SITELIBDIR}/numpy/core/include # workaround for https://github.com/xtensor-stack/xtensor-python/issues/272

NO_BUILD= yes
NO_ARCH= yes

do-test: install
@cd ${WRKSRC}/test && \
${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} . && \
${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} && \
${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} xtest

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions math/xtensor-python/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1637967434
SHA256 (xtensor-stack-xtensor-python-0.26.0_GH0.tar.gz) = 04dcfe84181c23f364b1e68a6d55d89d1679f31d8da0372db01af72534baf728
SIZE (xtensor-stack-xtensor-python-0.26.0_GH0.tar.gz) = 66262
6 changes: 6 additions & 0 deletions math/xtensor-python/pkg-descr
@@ -0,0 +1,6 @@
Python bindings for the xtensor C++ multi-dimensional array library.

xtensor is a C++ library for multi-dimensional arrays enabling numpy-style
broadcasting and lazy computing.

WWW: https://github.com/xtensor-stack/xtensor-python
12 changes: 12 additions & 0 deletions math/xtensor-python/pkg-plist
@@ -0,0 +1,12 @@
include/xtensor-python/pyarray.hpp
include/xtensor-python/pyarray_backstrides.hpp
include/xtensor-python/pycontainer.hpp
include/xtensor-python/pynative_casters.hpp
include/xtensor-python/pystrides_adaptor.hpp
include/xtensor-python/pytensor.hpp
include/xtensor-python/pyvectorize.hpp
include/xtensor-python/xtensor_python_config.hpp
include/xtensor-python/xtensor_type_caster_base.hpp
lib/cmake/xtensor-python/xtensor-pythonConfig.cmake
lib/cmake/xtensor-python/xtensor-pythonConfigVersion.cmake
lib/cmake/xtensor-python/xtensor-pythonTargets.cmake

0 comments on commit 9320013

Please sign in to comment.