You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
# 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
|
|
}
|