Files
guru/dev-python/aiomysql/aiomysql-0.1.1.ebuild
Anna (cybertailor) Vyalkova bb0aae8ad3 */*: disable py3.10
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>
2025-02-21 17:51:14 +05:00

66 lines
1.6 KiB
Bash

# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..12} )
DISTUTILS_USE_PEP517=setuptools
inherit databases distutils-r1
DESCRIPTION="aiomysql is a library for accessing a MySQL database from the asyncio"
HOMEPAGE="
https://pypi.python.org/pypi/aiomysql
https://github.com/aio-libs/aiomysql
https://aiomysql.readthedocs.io/en/latest/
"
SRC_URI="https://github.com/aio-libs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="dev-python/pymysql[${PYTHON_USEDEP}]"
BDEPEND="
dev-python/setuptools-scm[${PYTHON_USEDEP}]
test? (
${DATABASES_DEPEND[mysql]}
$(python_gen_impl_dep "ssl")
dev-python/sqlalchemy[${PYTHON_USEDEP}]
dev-python/uvloop[${PYTHON_USEDEP}]
)
"
DOCS=( CHANGES.txt {CONTRIBUTING,README}.rst )
PATCHES=( "${FILESDIR}/${P}-git_archive.patch" )
EPYTEST_IGNORE=(
# No Table.count() method in recent PyMySQL
tests/test_async_with.py
tests/sa/test_sa_connection.py
tests/sa/test_sa_transaction.py
)
distutils_enable_tests pytest
#distutils_enable_sphinx docs \
#dev-python/sphinxcontrib-asyncio
python_test() {
epytest "${S}"/tests --mysql-unix-socket "$(emysql --get-sockfile)"
}
src_test() {
emysql --start 3333
local sockfile=$(emysql --get-sockfile)
local -x MYSQL_ROOT_PASSWORD="rootpw"
ebegin "Changing database password"
mysql --user=root --socket="${sockfile}" --silent \
--execute="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}';"
eend $? || emysql --die "Changing database password failed"
distutils-r1_src_test
emysql --stop
}