From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0EE69138334 for ; Mon, 22 Apr 2019 13:53:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E362AE085B; Mon, 22 Apr 2019 13:53:46 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BA1CDE085B for ; Mon, 22 Apr 2019 13:53:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 97A6E34203C for ; Mon, 22 Apr 2019 13:53:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0B72F5B1 for ; Mon, 22 Apr 2019 13:53:42 +0000 (UTC) From: "Ralph Seichter" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ralph Seichter" Message-ID: <1555925857.a3a57530854f61379e2c724ba75010a29c54ad35.ralph-seichter@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-util/pybind11/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-util/pybind11/Manifest dev-util/pybind11/metadata.xml dev-util/pybind11/pybind11-2.2.4.ebuild X-VCS-Directories: dev-util/pybind11/ X-VCS-Committer: ralph-seichter X-VCS-Committer-Name: Ralph Seichter X-VCS-Revision: a3a57530854f61379e2c724ba75010a29c54ad35 X-VCS-Branch: master Date: Mon, 22 Apr 2019 13:53:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a3df9412-0631-46af-aa25-f6ba4511827e X-Archives-Hash: d0a7d2bec6c5818dc18e3b3140c5c03e commit: a3a57530854f61379e2c724ba75010a29c54ad35 Author: Bernd Waibel gmail com> AuthorDate: Mon Apr 22 09:37:37 2019 +0000 Commit: Ralph Seichter seichter de> CommitDate: Mon Apr 22 09:37:37 2019 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a3a57530 dev-util/pybind11: new package Bidirectional library for C++11 and Python bindings Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Bernd Waibel gmail.com> dev-util/pybind11/Manifest | 1 + dev-util/pybind11/metadata.xml | 12 +++++ dev-util/pybind11/pybind11-2.2.4.ebuild | 94 +++++++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+) diff --git a/dev-util/pybind11/Manifest b/dev-util/pybind11/Manifest new file mode 100644 index 0000000..5a4fe9b --- /dev/null +++ b/dev-util/pybind11/Manifest @@ -0,0 +1 @@ +DIST pybind11-2.2.4.tar.gz 548404 BLAKE2B b56230b5a4c0f392b714ead40d414a8b587396dbeec4089f5b77141cc7c2caf135f17f680b653d2e5be8b60a19a48a716fe8e562f337650fdac76461fb982aee SHA512 6bddf5c885ff92a3e373bcedc6574dfefe8be9ebb6176c6c96d475457466c76bfb982c6df4066cb0fbead4b867f87dbc4fbc1605c80852635016f614330ce041 diff --git a/dev-util/pybind11/metadata.xml b/dev-util/pybind11/metadata.xml new file mode 100644 index 0000000..e757cfb --- /dev/null +++ b/dev-util/pybind11/metadata.xml @@ -0,0 +1,12 @@ + + + + + waebbl@gmail.com + Bernd Waibel + + + Lightweight header-only library that exposes C++ types in Python and + vice versa, mainly to create Python bindings of existing C++ code. + + diff --git a/dev-util/pybind11/pybind11-2.2.4.ebuild b/dev-util/pybind11/pybind11-2.2.4.ebuild new file mode 100644 index 0000000..81fe08d --- /dev/null +++ b/dev-util/pybind11/pybind11-2.2.4.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# according to upstream is compatible with 2.7 and 3.x +# 3.7 not added due to some dependencies not yet supporting it +PYTHON_COMPAT=( python{2_7,3_{5,6}} ) + +inherit cmake-utils python-single-r1 + +DESCRIPTION="Seamless operability between C++11 and Python" +HOMEPAGE="https://pybind11.readthedocs.io/en/stable/" +SRC_URI="https://github.com/pybind/pybind11/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="BSD" + +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="doc test" + +RESTRICT="!test? ( test )" + +DEPEND=" + ${PYTHON_DEP} + doc? ( + dev-python/breathe[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ) + test? ( + dev-cpp/catch + dev-libs/boost[python,${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + ) +" + +RDEPEND=" + ${PYTHON_DEP} + dev-cpp/eigen + sys-apps/texinfo + sys-devel/gettext[cxx] + virtual/man +" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DOCS=( README.md CONTRIBUTING.md ISSUE_TEMPLATE.md ) + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_configure() { + mycmakeargs=( + -DPYBIND11_INSTALL=ON + -DPYBIND11_TEST=$(usex test) + ) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + + # documentation is not covered by cmake, but has it's own makefile + # using sphinx + if use doc; then + pushd "${S}"/docs || die + emake info man html + popd || die + fi +} + +src_test() { + cmake-utils_src_test + pushd "${BUILD_DIR}" || die + emake check + popd || die +} + +src_install() { + cmake-utils_src_install + + if use doc; then + local HTML_DOCS=( "${S}"/docs/.build/html/. ) + einstalldocs + + # install man and info pages + doman "${S}"/docs/.build/man/pybind11.1 + doinfo "${S}"/docs/.build/texinfo/pybind11.info + fi +}