mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 15:13:31 -04:00
Python 3.10 target is scheduled for removal in Gentoo: https://public-inbox.gentoo.org/gentoo-dev/e6ca9f1f4ababb79ab2a3d005c39b483c3ecef6e.camel@gentoo.org/ Sphinx 8.2.0 already dropped support for CPython 3.10 and PyPy 3.10, leading to multiple CI failures in ::guru. We can safely remove this target, because GURU is "experimental" and does not have stable keywords. Let's not remove "pypy3" right now because a) There are not many packages using it. b) So we can see which packages supported PyPy 3.10, and test them with PyPy 3.11. Closes: https://github.com/gentoo/guru/pull/291 Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
65 lines
1.4 KiB
Bash
65 lines
1.4 KiB
Bash
# Copyright 1999-2024 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
DISTUTILS_EXT=1
|
|
DISTUTILS_USE_PEP517=setuptools
|
|
PYTHON_COMPAT=( python3_{11..12} ) #py3.13 doesn't compile
|
|
|
|
inherit databases distutils-r1 optfeature pypi
|
|
|
|
DESCRIPTION="Python ODBC library"
|
|
HOMEPAGE="
|
|
https://pypi.org/project/pyodbc/
|
|
https://github.com/mkleehammer/pyodbc
|
|
"
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64"
|
|
IUSE="mssql"
|
|
|
|
RDEPEND=">=dev-db/unixODBC-2.3.0"
|
|
DEPEND="${RDEPEND}"
|
|
BDEPEND="
|
|
test? (
|
|
${DATABASES_DEPEND[mysql]}
|
|
dev-db/myodbc:8.0
|
|
)
|
|
"
|
|
|
|
distutils_enable_tests pytest
|
|
|
|
EPYTEST_DESELECT=(
|
|
# Broken test, generates a string longer than 4000 characters
|
|
tests/mysql_test.py::test_varchar
|
|
)
|
|
|
|
EPYTEST_IGNORE=(
|
|
# No easy way to run an SqlServer during tests
|
|
tests/sqlserver_test.py
|
|
)
|
|
|
|
python_test() {
|
|
export PYODBC_MYSQL="DRIVER=/usr/$(get_libdir)/myodbc-8.0/libmyodbc8a.so;SERVER=localhost;PORT=44444;DATABASE=test"
|
|
export PYODBC_POSTGRESQL="DRIVER=/usr/$(get_libdir)/psqlodbcw.so;SERVER=localhost;PORT=44445;DATABASE=test;UID=postgres"
|
|
epytest
|
|
}
|
|
|
|
src_test() {
|
|
emysql --start 44444
|
|
epostgres --start 44445
|
|
psql -U postgres -h 127.0.0.1 -p 44445 <<EOF
|
|
CREATE DATABASE test OWNER postgres
|
|
EOF
|
|
distutils-r1_src_test
|
|
epostgres --stop
|
|
emysql --stop
|
|
}
|
|
|
|
pkg_postinst() {
|
|
optfeature "MySQL support" dev-db/myodbc
|
|
optfeature "PostgreSQL support" dev-db/psqlodbc
|
|
}
|