dev-python/asyncpg: fix build with USE=debug

Unset "cython_directives" via build_ext options, because the default for
debug builds is broken.

Closes: https://bugs.gentoo.org/926720
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova
2024-10-23 22:30:44 +05:00
parent 305d74f150
commit 847204a2b2

View File

@@ -54,22 +54,27 @@ distutils_enable_tests pytest
distutils_enable_sphinx docs \
dev-python/sphinx-rtd-theme
src_prepare() {
python_prepare_all() {
# bug #926720
cat <<-EOF >> setup.cfg || die
[build_ext]
cython_always=True
cython_annotate=False
cython_directives=
EOF
# remove pre-generated Cython sources
rm asyncpg/{pgproto/pgproto,protocol/protocol}.c || die
distutils-r1_src_prepare
distutils-r1_python_prepare_all
}
src_configure() {
python_configure_all() {
use debug && \
export ASYNCPG_DEBUG=1
if ! use kerberos; then
use kerberos || \
EPYTEST_DESELECT+=( tests/test_connect.py::TestGssAuthentication )
fi
distutils-r1_src_configure
}
python_test() {