mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-12 08:33:15 -04:00
dev-python/pyodbc: bump to 5.1.0, add python 3.12 support
Closes: https://bugs.gentoo.org/928260 Closes: https://bugs.gentoo.org/931410 Signed-off-by: Julien Roy <julien@jroy.ca>
This commit is contained in:
@@ -1 +1 @@
|
||||
DIST pyodbc-4.0.35.tar.gz 273300 BLAKE2B cda55c3f880f5b8e243090a8150095e323bce5a28006d6105d8fcf4724a1f4219314591a4e53fc38844607d7714dffa5a221cd89c08dd5725aec251ca1977a18 SHA512 63b5191f5b57379e4767f94ecc83f80c73a3d40e7479753ccd7ff5ca27961be526bbf5ec169f9ca17c2ef7bd521507898be9b95110e290c4c69e1974c4c053f2
|
||||
DIST pyodbc-5.1.0.tar.gz 115450 BLAKE2B 8080db700abb952ae60045825f76e73a3d4a42f13c05e48eeb06574d5535f34345aa8bf2710730430229cb31b3d73c9fcb250d8d0fddabf94ecfcb24518bf931 SHA512 78817864d30048eed0c670a30e1cc66bc72edd6c21d069a5cc5831ed180b25a5b30d2bf2313628431943defbae66c2df96e90781ef17bb8929622b9f49cfcaab
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# No pypy3 support: https://github.com/mkleehammer/pyodbc/issues/915
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
inherit databases edo 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
|
||||
|
||||
python_test() {
|
||||
edo ${EPYTHON} tests3/run_tests.py -vv \
|
||||
--mysql "DRIVER=/usr/$(get_libdir)/myodbc-8.0/libmyodbc8a.so;SERVER=localhost;PORT=44444;DATABASE=test"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emysql --start 44444
|
||||
distutils-r1_src_test
|
||||
emysql --stop
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils-r1_src_install
|
||||
rm "${D}/usr/pyodbc.pyi" || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "MS SQL Server support" dev-db/freetds-0.64[odbc]
|
||||
optfeature "MySQL support" dev-db/myodbc
|
||||
optfeature "PostgreSQL support" dev-db/psqlodbc
|
||||
}
|
||||
64
dev-python/pyodbc/pyodbc-5.1.0.ebuild
Normal file
64
dev-python/pyodbc/pyodbc-5.1.0.ebuild
Normal file
@@ -0,0 +1,64 @@
|
||||
# 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_{10..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
|
||||
}
|
||||
Reference in New Issue
Block a user