diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2022-01-15 10:31:21 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2022-01-15 10:32:16 +0000 |
commit | 01c541ffecc47b79f4a1ec161645cad3138c8e37 (patch) | |
tree | d11e2cf49b6c8d0fe3a32f7c0a0e265044450a83 /math/py-faiss/Makefile | |
parent | bd61878319bf1e0a6cb722a089524d73ef8f4f4f (diff) | |
download | ports-01c541ffecc47b79f4a1ec161645cad3138c8e37.tar.gz ports-01c541ffecc47b79f4a1ec161645cad3138c8e37.zip |
math/py-faiss: New port: Library for efficient similarity search & clustering of dense vectors
Diffstat (limited to 'math/py-faiss/Makefile')
-rw-r--r-- | math/py-faiss/Makefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/math/py-faiss/Makefile b/math/py-faiss/Makefile new file mode 100644 index 000000000000..ef4d64d0daef --- /dev/null +++ b/math/py-faiss/Makefile @@ -0,0 +1,42 @@ +PORTNAME= faiss +DISTVERSIONPREFIX= v +DISTVERSION= 1.7.2 +CATEGORIES= math +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Library for efficient similarity search & clustering of dense vectors + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/../../LICENSE + +PY_DEPENDS= ${PYNUMPY} +BUILD_DEPENDS= swig:devel/swig \ + ${PY_DEPENDS} +LIB_DEPENDS= libfaiss.so:math/faiss +RUN_DEPENDS= ${PY_DEPENDS} + +USES= cmake compiler:c++11-lang localbase python + +USE_GITHUB= yes +GH_ACCOUNT= facebookresearch + +WRKSRC_SUBDIR= faiss/python + +PLIST_FILES= \ + ${PYTHON_SITELIBDIR}/${PORTNAME}/_swigfaiss.so \ + ${PYTHON_SITELIBDIR}/${PORTNAME}/__init__.py \ + ${PYTHON_SITELIBDIR}/${PORTNAME}/loader.py \ + ${PYTHON_SITELIBDIR}/${PORTNAME}/swigfaiss.py + +do-install: # see https://github.com/facebookresearch/faiss/issues/2194 + ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME} + ${INSTALL_LIB} ${BUILD_WRKSRC}/_swigfaiss.so ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME} +.for f in __init__.py loader.py swigfaiss.py + ${INSTALL_DATA} ${BUILD_WRKSRC}/${f} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME} +.endfor + +do-test: install + @${PYTHON_CMD} ${FILESDIR}/test.py + +.include <bsd.port.mk> |