# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_EXT=1 DISTUTILS_USE_PEP517=setuptools PYPI_VERIFY_REPO=https://github.com/agronholm/cbor2 PYTHON_COMPAT=( python3_{12..15} ) RUST_MIN_VER="1.85.0" CRATES=" autocfg@1.5.1 bigdecimal@0.4.11 cfg-if@1.0.5 crunchy@0.2.4 half@2.7.1 heck@0.5.0 libc@0.2.191 libm@0.2.16 num-bigint@0.4.8 num-integer@0.1.47 num-traits@0.2.19 once_cell@1.21.4 portable-atomic@1.15.0 proc-macro2@1.0.107 pyo3-build-config@0.30.1 pyo3-ffi@0.30.1 pyo3-macros-backend@0.30.1 pyo3-macros@0.30.1 pyo3@0.30.1 quote@1.0.47 syn@2.0.119 syn@3.0.9 target-lexicon@0.13.5 unicode-ident@1.0.27 zerocopy-derive@0.8.63 zerocopy@0.8.63 " inherit cargo distutils-r1 pypi DESCRIPTION="CBOR (de)serializer with extensive tag support" HOMEPAGE=" https://github.com/agronholm/cbor2/ https://pypi.org/project/cbor2/ " SRC_URI+=" ${CARGO_CRATE_URIS} " LICENSE="MIT" # Dependent crate licenses LICENSE+=" Apache-2.0-with-LLVM-exceptions MIT Unicode-3.0" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" BDEPEND=" >=dev-python/setuptools-61[${PYTHON_USEDEP}] dev-python/setuptools-rust[${PYTHON_USEDEP}] >=dev-python/setuptools-scm-6.4[${PYTHON_USEDEP}] " EPYTEST_PLUGINS=( hypothesis ) distutils_enable_tests pytest # Files built without CFLAGS/LDFLAGS, acceptable for rust QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/cbor2/_cbor2.*.so" src_unpack() { pypi_src_unpack cargo_crate_unpack cargo_gen_config }