git: a2851b786959 - main - devel/py-nanobind: New port: Tiny and efficient C++/Python bindings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 26 Apr 2024 03:26:10 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=a2851b786959d5b5ad821da82d167f435ed1bf8c commit a2851b786959d5b5ad821da82d167f435ed1bf8c Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2024-04-26 01:15:15 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2024-04-26 03:26:05 +0000 devel/py-nanobind: New port: Tiny and efficient C++/Python bindings --- devel/Makefile | 1 + devel/py-nanobind/Makefile | 37 ++++++++++++++++++++++++++++ devel/py-nanobind/distinfo | 5 ++++ devel/py-nanobind/files/patch-pyproject.toml | 9 +++++++ devel/py-nanobind/pkg-descr | 5 ++++ 5 files changed, 57 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index c398cfa454c7..5440e3313dc4 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -5094,6 +5094,7 @@ SUBDIR += py-mypy_extensions SUBDIR += py-mystic SUBDIR += py-naiveBayesClassifier + SUBDIR += py-nanobind SUBDIR += py-nanotime SUBDIR += py-natsort SUBDIR += py-natural diff --git a/devel/py-nanobind/Makefile b/devel/py-nanobind/Makefile new file mode 100644 index 000000000000..d39734df7c67 --- /dev/null +++ b/devel/py-nanobind/Makefile @@ -0,0 +1,37 @@ +PORTNAME= nanobind +DISTVERSIONPREFIX= v +DISTVERSION= 1.9.2 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Tiny and efficient C++/Python bindings +WWW= https://github.com/wjakob/nanobind + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}scikit-build>0:devel/py-scikit-build@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} + +USES= cmake:insource,testing python +USE_PYTHON= pep517 autoplist + +USE_GITHUB= yes +GH_ACCOUNT= wjakob +GH_TUPLE= Tessil:robin-map:188c455:robin_map/ext/robin_map + +CMAKE_OFF= NB_TEST +CMAKE_TESTING_ON= NB_TEST +CMAKE_TESTING_TARGET= + +NO_ARCH= yes + +post-test: # run-tests + @cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest . + +.include <bsd.port.mk> diff --git a/devel/py-nanobind/distinfo b/devel/py-nanobind/distinfo new file mode 100644 index 000000000000..e20bbfcbaeaf --- /dev/null +++ b/devel/py-nanobind/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1714059630 +SHA256 (wjakob-nanobind-v1.9.2_GH0.tar.gz) = 149a3da40b0a988513d8cf5e71db3037373823505a3c92f87b988c92d7e0ab34 +SIZE (wjakob-nanobind-v1.9.2_GH0.tar.gz) = 785164 +SHA256 (Tessil-robin-map-188c455_GH0.tar.gz) = c3f05ed8933a1f9aa57295c8ad17bd44756cf5cf030a95325c61aa862fa19680 +SIZE (Tessil-robin-map-188c455_GH0.tar.gz) = 70577 diff --git a/devel/py-nanobind/files/patch-pyproject.toml b/devel/py-nanobind/files/patch-pyproject.toml new file mode 100644 index 000000000000..90fb521c5bd4 --- /dev/null +++ b/devel/py-nanobind/files/patch-pyproject.toml @@ -0,0 +1,9 @@ +--- pyproject.toml.orig 2024-04-25 15:40:44 UTC ++++ pyproject.toml +@@ -1,5 +1,5 @@ + [build-system] +-requires = ["setuptools>=42", "wheel", "scikit-build", "cmake>=3.17", "ninja"] ++requires = ["setuptools>=42", "wheel", "scikit-build"] + build-backend = "setuptools.build_meta" + + diff --git a/devel/py-nanobind/pkg-descr b/devel/py-nanobind/pkg-descr new file mode 100644 index 000000000000..52bfaa1ab0b0 --- /dev/null +++ b/devel/py-nanobind/pkg-descr @@ -0,0 +1,5 @@ +nanobind is a small binding library that exposes C++ types in Python and vice +versa. It is reminiscent of Boost.Python and pybind11 and uses near-identical +syntax. In contrast to these existing tools, nanobind is more efficient: +bindings compile in a shorter amount of time, produce smaller binaries, and have +better runtime performance.