2024-06-27 00:17:37 +02:00
|
|
|
# Copyright 1999-2024 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
|
|
|
|
DISTUTILS_USE_PEP517=hatchling
|
2024-07-13 01:54:15 +02:00
|
|
|
PYTHON_COMPAT=( python3_{10..13} )
|
2024-06-27 00:17:37 +02:00
|
|
|
|
|
|
|
inherit distutils-r1 pypi
|
|
|
|
|
|
|
|
DESCRIPTION="Python bindings for libmongocrypt"
|
|
|
|
HOMEPAGE="
|
|
|
|
https://github.com/mongodb/libmongocrypt/
|
|
|
|
https://pypi.org/project/pymongocrypt
|
|
|
|
"
|
|
|
|
|
|
|
|
LICENSE="Apache-2.0"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
|
|
|
|
|
|
|
RDEPEND="
|
|
|
|
dev-libs/libmongocrypt
|
|
|
|
dev-python/cffi[${PYTHON_USEDEP}]
|
|
|
|
dev-python/cryptography[${PYTHON_USEDEP}]
|
|
|
|
dev-python/packaging[${PYTHON_USEDEP}]
|
|
|
|
dev-python/httpx[${PYTHON_USEDEP}]
|
|
|
|
|
|
|
|
"
|
|
|
|
BDEPEND="
|
|
|
|
test? (
|
|
|
|
dev-python/pymongo[${PYTHON_USEDEP}]
|
|
|
|
dev-python/pymongo-auth-aws[${PYTHON_USEDEP}]
|
|
|
|
dev-python/respx[${PYTHON_USEDEP}]
|
|
|
|
dev-python/unasync[${PYTHON_USEDEP}]
|
|
|
|
)
|
|
|
|
"
|
|
|
|
|
|
|
|
distutils_enable_tests pytest
|
2024-07-09 08:05:51 +02:00
|
|
|
|
2024-07-24 14:33:24 +02:00
|
|
|
src_prepare() {
|
|
|
|
distutils-r1_src_prepare
|
|
|
|
# we do not want hatch-requirements-txt and its ton of NIH deps
|
|
|
|
sed -i -e '/requirements/d' pyproject.toml || die
|
|
|
|
}
|
|
|
|
|
2024-07-09 08:05:51 +02:00
|
|
|
python_test() {
|
|
|
|
local EPYTEST_DESELECT=(
|
|
|
|
# slow
|
|
|
|
test/performance/perf_test.py::TestBulkDecryption::runTest
|
|
|
|
# needs mongodb-enterprise-6+
|
|
|
|
test/test_mongocrypt.py::TestMongoCrypt::test_encrypt
|
|
|
|
test/test_mongocrypt.py::TestMongoCryptCallback::test_encrypt
|
|
|
|
test/test_mongocrypt.py::TestExplicitEncryption::test_rangePreview_query_int32
|
|
|
|
test/test_mongocrypt.py::TestExplicitEncryption::test_range_query_int32
|
|
|
|
# test/test_mongocrypt.py::TestAsyncExplicitEncryption::test_range_query_int32
|
|
|
|
# test/test_mongocrypt.py::TestMongoCrypt::test_encrypt_encrypted_fields_map
|
|
|
|
# test/test_mongocrypt.py::TestMongoCryptCallback::test_crypt_shared
|
|
|
|
# test/test_mongocrypt.py::TestAsyncMongoCryptCallback::test_encrypt
|
|
|
|
# test/test_mongocrypt.py::TestAsyncMongoCryptCallback::test_crypt_shared
|
|
|
|
)
|
|
|
|
epytest
|
|
|
|
}
|