commit:     37f44d44c90d7a7f0e8eede6bc550c9bbbd5b9f5
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Mar 30 13:01:53 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Mar 30 13:05:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=37f44d44

dev-python/pyodbc: add 4.0.35, drop 4.0.32

Closes: https://bugs.gentoo.org/897534
Closes: https://bugs.gentoo.org/817197
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 dev-python/pyodbc/Manifest             |  2 +-
 dev-python/pyodbc/pyodbc-4.0.32.ebuild | 27 -----------------
 dev-python/pyodbc/pyodbc-4.0.35.ebuild | 53 ++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+), 28 deletions(-)

diff --git a/dev-python/pyodbc/Manifest b/dev-python/pyodbc/Manifest
index 261ffcc6b..d705d9525 100644
--- a/dev-python/pyodbc/Manifest
+++ b/dev-python/pyodbc/Manifest
@@ -1 +1 @@
-DIST pyodbc-4.0.32.tar.gz 280035 BLAKE2B 
f8c3479dc3eb78502d9a1621475603db0c53d69a65b09437180bf7eab14a919507413bd1b6bd56c00a1ba45cb6f1a6a86bd1e8b0bfcbdaad4a56a042d3937fda
 SHA512 
a282f9b83e6cbf874db8135f1088dea86544dda49a16e86f988302f1675ff16d33473fbef092c6c0acdae7de1df6c4528cb1ea5ce3db0e6df49a7c457fcb34f8
+DIST pyodbc-4.0.35.tar.gz 273300 BLAKE2B 
cda55c3f880f5b8e243090a8150095e323bce5a28006d6105d8fcf4724a1f4219314591a4e53fc38844607d7714dffa5a221cd89c08dd5725aec251ca1977a18
 SHA512 
63b5191f5b57379e4767f94ecc83f80c73a3d40e7479753ccd7ff5ca27961be526bbf5ec169f9ca17c2ef7bd521507898be9b95110e290c4c69e1974c4c053f2

diff --git a/dev-python/pyodbc/pyodbc-4.0.32.ebuild 
b/dev-python/pyodbc/pyodbc-4.0.32.ebuild
deleted file mode 100644
index fa942154b..000000000
--- a/dev-python/pyodbc/pyodbc-4.0.32.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..10} ) # pypy3 
https://github.com/mkleehammer/pyodbc/issues/915
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Python ODBC library"
-HOMEPAGE="
-       https://github.com/mkleehammer/pyodbc
-       https://pypi.org/project/pyodbc/
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="mssql"
-
-RDEPEND="
-       >=dev-db/unixODBC-2.3.0
-       mssql? ( >=dev-db/freetds-0.64[odbc] )
-"
-DEPEND="${RDEPEND}"
-
-RESTRICT="test" # need running databases

diff --git a/dev-python/pyodbc/pyodbc-4.0.35.ebuild 
b/dev-python/pyodbc/pyodbc-4.0.35.ebuild
new file mode 100644
index 000000000..9d10b40f5
--- /dev/null
+++ b/dev-python/pyodbc/pyodbc-4.0.35.ebuild
@@ -0,0 +1,53 @@
+# 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_{9..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? (
+               $(emysql --get-depend)
+               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 /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
+}

Reply via email to