summaryrefslogtreecommitdiff
path: root/dev-python/tweedledum/tweedledum-1.1.1-r1.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/tweedledum/tweedledum-1.1.1-r1.ebuild')
-rw-r--r--dev-python/tweedledum/tweedledum-1.1.1-r1.ebuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-python/tweedledum/tweedledum-1.1.1-r1.ebuild b/dev-python/tweedledum/tweedledum-1.1.1-r1.ebuild
new file mode 100644
index 000000000000..48368b47ba02
--- /dev/null
+++ b/dev-python/tweedledum/tweedledum-1.1.1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Library for analysis, compilation, synthesis, optimization of quantum circuits"
+HOMEPAGE="https://github.com/boschmitt/tweedledum"
+SRC_URI="https://github.com/boschmitt/tweedledum/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+# Drop on next bump, see bug #858200
+SRC_URI+=" https://github.com/boschmitt/tweedledum/commit/e73beb23a3feeba02a851e3f8131e3c85a29de2b.patch -> ${P}-fmt-e73beb23a3feeba02a851e3f8131e3c85a29de2b.patch"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+# Unbundle dev-python/pybind11[${PYTHON_USEDEP}]?
+RDEPEND="
+ dev-cpp/nlohmann_json
+ dev-libs/libfmt:=
+"
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/eigen
+"
+BDEPEND=">=dev-python/scikit-build-0.12.0"
+
+PATCHES=(
+ "${DISTDIR}"/${P}-fmt-e73beb23a3feeba02a851e3f8131e3c85a29de2b.patch
+)
+
+distutils_enable_tests pytest
+
+python_compile() {
+ # -DTWEEDLEDUM_USE_EXTERNAL_PYBIND11=ON
+ local -x SKBUILD_CONFIGURE_OPTIONS="-DCMAKE_BUILD_TYPE=RelWithDebInfo"
+ distutils-r1_python_compile
+}
+
+python_test() {
+ epytest python/test
+}