commit: 5c39cf066074c44295f3eabbd72c3eea86e92f76 Author: leycec <leycec <AT> gmail <DOT> com> AuthorDate: Fri Jul 16 07:11:52 2021 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> CommitDate: Sun Jul 18 08:34:45 2021 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=5c39cf06
dev-python/cadquery-pywrap: add add pywrap, a mandatory dependency of CadQuery vis-a-vis OCP Signed-off-by: Cecil Curry <leycec <AT> gmail.com> Closes: https://github.com/gentoo/sci/pull/1098 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> .../cadquery-pywrap-7.5.2_rc20210526.ebuild | 70 ++++++++++++++++++++++ dev-python/cadquery-pywrap/metadata.xml | 12 ++++ 2 files changed, 82 insertions(+) diff --git a/dev-python/cadquery-pywrap/cadquery-pywrap-7.5.2_rc20210526.ebuild b/dev-python/cadquery-pywrap/cadquery-pywrap-7.5.2_rc20210526.ebuild new file mode 100644 index 000000000..fc97f9db1 --- /dev/null +++ b/dev-python/cadquery-pywrap/cadquery-pywrap-7.5.2_rc20210526.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..9} ) + +inherit llvm toolchain-funcs distutils-r1 + +DESCRIPTION="C++ binding generator based on libclang and pybind11" +HOMEPAGE="https://github.com/CadQuery/pywrap" + +#FIXME: Uncomment on bumping to the next stable release. +# MY_PN=occt +# MY_PV=$(ver_cut 1-2) +# MY_P="${MY_PN}${MY_PV}" +# SRC_URI="https://github.com/CadQuery/pywrap/archive/refs/tags/${MY_P}.tar.gz" + +# The official pywrap 7.4.0 tarball is broken, but pywrap 7.5.2 has yet to be +# officially released. We instead package a commit known to work as expected. +MY_COMMIT="f8869e5a47fd3e3e1d31e7ab89b46c158f7487bf" +SRC_URI="https://github.com/CadQuery/pywrap/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +KEYWORDS="~amd64 ~x86" +SLOT="0" + +# Dependencies are intentionally listed in "setup.py" order. +RDEPEND=" + dev-python/click[${PYTHON_USEDEP}] + dev-python/logzero[${PYTHON_USEDEP}] + dev-python/path-py[${PYTHON_USEDEP}] + dev-python/clang-python[${PYTHON_USEDEP}] + dev-python/cymbal[${PYTHON_USEDEP}] + dev-python/toml[${PYTHON_USEDEP}] + dev-python/pandas[${PYTHON_USEDEP}] + >=dev-python/joblib-1.0.0[${PYTHON_USEDEP}] + dev-python/tqdm[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/toposort[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pybind11[${PYTHON_USEDEP}] + dev-python/schema[${PYTHON_USEDEP}] + sci-libs/vtk +" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/pywrap-${MY_COMMIT}" + +src_prepare() { + # Relax Jinja version requirements. See also upstream pull request: + # https://github.com/CadQuery/pywrap/pull/34 + sed -i -e "s~'jinja2==\\(.*\\)',~'jinja2>=\\1,<4',~" setup.py || die + sed -i \ + -e 's~^\({%- macro super(cls,classes,typedefs\)\() -%}\)$~\1=[]\2~' \ + bindgen/macros.j2 || die + + #FIXME: Submit an upstream issue. This violates PEP 440 standards. + # Sanitize the "bindgen" version to avoid Gentoo QA notices. + sed -i -e 's~\(version=\)"0.1dev"~\1"'$(ver_rs 3 '')'"~' setup.py || die + + # Replace conda- with Gentoo-specific prefix dirnames. + sed -i -e "s~\\bgetenv('CONDA_PREFIX')~'${EPREFIX}/usr'~" bindgen/*.py || + die + + # Reduce all hardcoded header includes to noops. + sed -i -e 's~rv\.append(Path(prefix).*~True~' bindgen/utils.py || die + + distutils-r1_src_prepare +} diff --git a/dev-python/cadquery-pywrap/metadata.xml b/dev-python/cadquery-pywrap/metadata.xml new file mode 100644 index 000000000..aef989a0c --- /dev/null +++ b/dev-python/cadquery-pywrap/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>[email protected]</email> + <name>Gentoo Science Project</name> + </maintainer> + <stabilize-allarches/> + <upstream> + <remote-id type="github">CadQuery/pywrap</remote-id> + </upstream> +</pkgmetadata>
