diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
commit | d934827bf44b7cfcf6711964418148fa60877668 (patch) | |
tree | 0625f358789b5e015e49db139cc1dbc9be00428f /dev-python/sqlalchemy | |
parent | 2e34d110f164bf74d55fced27fe0000201b3eec5 (diff) |
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-python/sqlalchemy')
-rw-r--r-- | dev-python/sqlalchemy/Manifest | 10 | ||||
-rw-r--r-- | dev-python/sqlalchemy/files/sqlalchemy-1.3.20-pypy3.patch | 188 | ||||
-rw-r--r-- | dev-python/sqlalchemy/files/sqlalchemy-pytest-deprecation.patch | 67 | ||||
-rw-r--r-- | dev-python/sqlalchemy/metadata.xml | 2 | ||||
-rw-r--r-- | dev-python/sqlalchemy/sqlalchemy-1.3.11.ebuild | 64 | ||||
-rw-r--r-- | dev-python/sqlalchemy/sqlalchemy-1.3.17.ebuild | 1 | ||||
-rw-r--r-- | dev-python/sqlalchemy/sqlalchemy-1.3.20.ebuild | 68 |
7 files changed, 263 insertions, 137 deletions
diff --git a/dev-python/sqlalchemy/Manifest b/dev-python/sqlalchemy/Manifest index 9b34d7e81b3f..a86d47ed4aa4 100644 --- a/dev-python/sqlalchemy/Manifest +++ b/dev-python/sqlalchemy/Manifest @@ -1,6 +1,6 @@ -AUX sqlalchemy-pytest-deprecation.patch 2695 BLAKE2B d71c791e39a6caf9d8e67dc61ede490749ee7774c8719238b9291dfdd1e0fd591f278baaa47b7b61b4729b9aa1017bebd2b2d6dee4d15a47b2ad6d1f3829ca0e SHA512 709c0f80bfef99a1ef42446cad94a9518535b07697de21a7b4a83ce22a2fd30df495747e8ce31dfed21291f8ffc56867ccc0b0eff4b38de41ef26c99685a46d1 -DIST SQLAlchemy-1.3.11.tar.gz 6007784 BLAKE2B c889ea28ae08fcb83d338ab01a64533142428ee91a6c11b9a7f2116f99161c066e66f49d76bdd2c7600f1a7f86a2add217f49dda4cf97566a875f28d3d4b24be SHA512 c691539db4edd62af749087728dfd424010bfb3ca2cc8503a4b96c1625d059d4c2a748b9a35cc870cc99ca9df61966cce406f9b570b25e55c3632a99b8621e74 +AUX sqlalchemy-1.3.20-pypy3.patch 7321 BLAKE2B 706ff7da1f25a667784f462effb85593e8ad9a3fe893000866e487ec32328a571f4440ce4dcce61e2b5f1ded5c8145f5cd12a141c40f4bb64e87135aa18a8274 SHA512 40944c59cc6cb17f512d0df1e2cf50626dfa6a53e2e8b182c0ccb4007c2338d8058459a9158e9e72ee6aa89394275cf818f0c7572b249175d3acd52f5a1c2827 DIST SQLAlchemy-1.3.17.tar.gz 5979141 BLAKE2B f0fa46493461f532ebca9420fc9f49a2c04af888aa99653946a5bb563d40b8bb714a03301300ebb80cca76a99f8226ddfcde4216e8fc2593d3a161b5072276ab SHA512 6f6d54b9018ece6c289f28a3a41ffb1b2216206edee08c49f387e9f30740969dfe0f8272654ce4efca159a2a6619e76c41b2ad2b10c391cdd64681ac17d0bc79 -EBUILD sqlalchemy-1.3.11.ebuild 1592 BLAKE2B 13dfeb772f622cb4f92c06f657385cae9793d3dd87b7e31649adfa49bed27dfcd24222ee2c1dda87f70890232e184fc2475155a8a47c49dbef11bb4275895d5f SHA512 341a8d6e9cc1b6346a1c68c3c70776c373fe2e5a73a33cf7822e158efdf9a504d4f74752beef428d0b4d5c0d044c311de310939c7572706c42449bc1869cb8cc -EBUILD sqlalchemy-1.3.17.ebuild 1467 BLAKE2B bdef045c84c2f1edbe7fe2a156f1dcc9bb3129554e9e0abcf7461d70f43614200f7f8299664758bb80b98930bee809b6d34ce25990fae8f3ba686e1e8063b564 SHA512 ce9065eedcc9ad44b404b9f9a4fae30289939579a6356931509b922f03296eb17264dd71a3d855fe02fc0c91409be0b011ed1641b0e631b260f5a950ce473bd8 -MISC metadata.xml 313 BLAKE2B 71212a9a3076b472b488bdb4e12fef98e16881a32a8383c5fa6a9008353d2e043dfe64cb536ecef145ba74ba77ef3a6c43d705d5072d1b56e11eacfadd1d0edd SHA512 ef6298f9e38312117a0d1ab1e63f2fb21ae51ff149053603c19437b90d954827858579ab8f021cb52919aff4474a27f5a598d8515a7e5a9f2e7e35aee53c5326 +DIST SQLAlchemy-1.3.20.tar.gz 6264898 BLAKE2B 4c386eff56c2f9ec7ef467e3bc0032629582a970707dc11e3744fe3903d9cb18457f5e0be4dc9c20727b5733f158e031bf8b40f586dadb8f4ab8d0cae3cf7398 SHA512 29c52ada1a66f906ed2563df2ab093eceb7c09de45749c96031f30a1512d20b1d698e00640c777169ef3db99ab012151770a3daea45a51df934269b554ff4b28 +EBUILD sqlalchemy-1.3.17.ebuild 1439 BLAKE2B 019fe439aa340d52082616c83fde43e34367855f126f6f5200eeb28d2b537f9dedb92db1d8a78bd424323ef8a6f3ec270562407bcf49641bb1d869929f7d058f SHA512 0d3ade8b1a4bd5328c4efa5401cae609a98d5efaee913fb38aca6a46b77481cab6344c97bdb7141523e35c14c773f9ef7e277908340d5845263ef44c3cca89f6 +EBUILD sqlalchemy-1.3.20.ebuild 1892 BLAKE2B f8d26899591138928942c4974a67ef9bcd49b32237bf1b05205ee1ff777f6cf692430375889fe59168cf8cb8bc97e380b390bce63ee3abc74edcd41f20e41e79 SHA512 d454181ebeca4e6fde6973e84d50c79a21f87290d68540b698bd53ba0daecf5ab71670fa3d1fd0aabab3212f295ad1b7ffd397f1ce057d775557ccb35b04546c +MISC metadata.xml 443 BLAKE2B 44c09d8332158ed09ece04188ca9b41a68b7e8a0a2b6d8d44cef44d7be396a08cab3432c05b3bcdbe706a470662d313548e80e202c8ea0e02aec6035daacb3ef SHA512 c262e5b27bbb02b6e64a1fa8a240cf14fe572dc0d41901dfc65ca979f7f89b3e0885b71a6f5c39b33e1534e13366873144693eed44bf43712d3c924a504dc6c8 diff --git a/dev-python/sqlalchemy/files/sqlalchemy-1.3.20-pypy3.patch b/dev-python/sqlalchemy/files/sqlalchemy-1.3.20-pypy3.patch new file mode 100644 index 000000000000..3455534eb35d --- /dev/null +++ b/dev-python/sqlalchemy/files/sqlalchemy-1.3.20-pypy3.patch @@ -0,0 +1,188 @@ +commit 1607c5c19f8ef362be7182b0ee0fddc6a3d3140e +Author: Federico Caselli <cfederico87@gmail.com> +Date: Sat Apr 18 18:10:59 2020 +0200 + + Enable pypy tests on github workflow + + Fixes: #5223 + Change-Id: I0952e54ed9af2952ea340be1945311376ffc1ad2 + +diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py +index 6f3170a9e..0427eeac5 100644 +--- a/lib/sqlalchemy/orm/mapper.py ++++ b/lib/sqlalchemy/orm/mapper.py +@@ -1326,7 +1326,7 @@ class Mapper(InspectionAttr): + if key == "__init__" and hasattr(method, "_sa_original_init"): + method = method._sa_original_init + if isinstance(method, types.MethodType): +- method = method.im_func ++ method = method.__func__ + if isinstance(method, types.FunctionType): + if hasattr(method, "__sa_reconstructor__"): + self._reconstructor = method +diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py +index ad4ebb656..dc47f671e 100644 +--- a/lib/sqlalchemy/testing/plugin/pytestplugin.py ++++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py +@@ -340,7 +340,7 @@ def %(name)s(%(args)s): + code, {"target": target, "fn": fn}, fn.__name__ + ) + if not add_positional_parameters: +- decorated.__defaults__ = getattr(fn, "im_func", fn).__defaults__ ++ decorated.__defaults__ = getattr(fn, "__func__", fn).__defaults__ + decorated.__wrapped__ = fn + return update_wrapper(decorated, fn) + else: +diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py +index 7de16bcdf..e256d7764 100644 +--- a/lib/sqlalchemy/util/langhelpers.py ++++ b/lib/sqlalchemy/util/langhelpers.py +@@ -151,7 +151,7 @@ def %(name)s(%(args)s): + decorated = _exec_code_in_env( + code, {targ_name: target, fn_name: fn}, fn.__name__ + ) +- decorated.__defaults__ = getattr(fn, "im_func", fn).__defaults__ ++ decorated.__defaults__ = getattr(fn, "__func__", fn).__defaults__ + decorated.__wrapped__ = fn + return update_wrapper(decorated, fn) + +@@ -751,7 +751,7 @@ def monkeypatch_proxied_specials( + fn = getattr(from_cls, method) + if not hasattr(fn, "__call__"): + continue +- fn = getattr(fn, "im_func", fn) ++ fn = getattr(fn, "__func__", fn) + except AttributeError: + continue + try: +diff --git a/test/base/test_utils.py b/test/base/test_utils.py +index 8356de61b..c04dea7cd 100644 +--- a/test/base/test_utils.py ++++ b/test/base/test_utils.py +@@ -411,7 +411,8 @@ class WrapCallableTest(fixtures.TestBase): + lambda: my_functools_default(), my_functools_default + ) + eq_(c.__name__, "partial") +- eq_(c.__doc__, my_functools_default.__call__.__doc__) ++ if not compat.pypy: # pypy fails this check ++ eq_(c.__doc__, my_functools_default.__call__.__doc__) + eq_(c(), 5) + + +diff --git a/test/engine/test_logging.py b/test/engine/test_logging.py +index fe4ff44a7..e14c3a37d 100644 +--- a/test/engine/test_logging.py ++++ b/test/engine/test_logging.py +@@ -8,6 +8,7 @@ from sqlalchemy import or_ + from sqlalchemy import select + from sqlalchemy import String + from sqlalchemy import Table ++from sqlalchemy import testing + from sqlalchemy import util + from sqlalchemy.sql import util as sql_util + from sqlalchemy.testing import assert_raises_message +@@ -460,10 +461,12 @@ class PoolLoggingTest(fixtures.TestBase): + q = self._stpool_logging_fixture() + self._test_queuepool(q, False) + ++ @testing.requires.predictable_gc + def test_queuepool_echo(self): + q = self._queuepool_echo_fixture() + self._test_queuepool(q) + ++ @testing.requires.predictable_gc + def test_queuepool_logging(self): + q = self._queuepool_logging_fixture() + self._test_queuepool(q) +diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py +index 3b989959e..c8cd89555 100644 +--- a/test/engine/test_pool.py ++++ b/test/engine/test_pool.py +@@ -608,6 +608,7 @@ class PoolEventsTest(PoolTestBase): + assert canary.call_args_list[0][0][0] is dbapi_con + assert canary.call_args_list[0][0][2] is exc + ++ @testing.requires.predictable_gc + def test_checkin_event_gc(self): + p, canary = self._checkin_event_fixture() + +diff --git a/test/orm/test_deferred.py b/test/orm/test_deferred.py +index f8817bbd7..2bf466c15 100644 +--- a/test/orm/test_deferred.py ++++ b/test/orm/test_deferred.py +@@ -1700,6 +1700,8 @@ class WithExpressionTest(fixtures.DeclarativeMappedTest): + c1 = s.query(C).order_by(C.id) + eq_(c1.all(), [C(c_expr=1), C(c_expr=1)]) + ++ s.expunge_all() ++ + c2 = ( + s.query(C) + .options(with_expression(C.c_expr, C.x * 2)) + +commit 8d3ac81a8794bdd3532ad07427edf9f48493919d +Date: Wed Oct 14 18:25:45 2020 +0200 + + Skip a failing test that got removed in master + + https://github.com/sqlalchemy/sqlalchemy/commit/a9b068ae564e5e775e312373088545b75aeaa1b0 + +diff --git a/test/orm/test_deprecations.py b/test/orm/test_deprecations.py +index 156898f..0d6dc72 100644 +--- a/test/orm/test_deprecations.py ++++ b/test/orm/test_deprecations.py +@@ -560,7 +560,7 @@ class StrongIdentityMapTest(_fixtures.FixtureTest): + def test_prune_imap(self): + self._test_prune(self._strong_ident_fixture) + +- def test_prune_events(self): ++ def _test_prune_events(self): + self._test_prune(self._event_fixture) + + @testing.fails_if(lambda: pypy, "pypy has a real GC") + +commit 1a1cc0e623698a75274f1525d2d14464ff738b86 +Date: Wed Oct 14 18:28:56 2020 +0200 + + Fix PyPy-related tests + + Partial backport of https://github.com/sqlalchemy/sqlalchemy/commit/9e31fc74089cf565df5f275d22eb8ae5414d6e45 + +diff --git a/test/base/test_utils.py b/test/base/test_utils.py +diff --git a/test/base/test_utils.py b/test/base/test_utils.py +index 8356de61b..c3d25b824 100644 +--- a/test/base/test_utils.py ++++ b/test/base/test_utils.py +@@ -1725,7 +1725,7 @@ class ArgInspectionTest(fixtures.TestBase): + + assert_raises(TypeError, get_callable_argspec, datetime.datetime.now) + +- @fails_if(lambda: util.pypy, "pypy returns plain *arg, **kw") ++ @testing.requires.cpython + def test_callable_argspec_obj_init(self): + assert_raises(TypeError, get_callable_argspec, object) + +@@ -2154,10 +2154,7 @@ class TestFormatArgspec(_Py3KFixtures, fixtures.TestBase): + grouped=False, + ) + +- @testing.fails_if( +- lambda: util.pypy, +- "pypy doesn't report Obj.__init__ as object.__init__", +- ) ++ @testing.requires.cpython + def test_init_grouped(self): + object_spec = { + "args": "(self)", +@@ -2181,10 +2178,7 @@ class TestFormatArgspec(_Py3KFixtures, fixtures.TestBase): + self._test_init(None, object_spec, wrapper_spec, custom_spec) + self._test_init(True, object_spec, wrapper_spec, custom_spec) + +- @testing.fails_if( +- lambda: util.pypy, +- "pypy doesn't report Obj.__init__ as object.__init__", +- ) ++ @testing.requires.cpython + def test_init_bare(self): + object_spec = { + "args": "self", diff --git a/dev-python/sqlalchemy/files/sqlalchemy-pytest-deprecation.patch b/dev-python/sqlalchemy/files/sqlalchemy-pytest-deprecation.patch deleted file mode 100644 index ee09a7312e6a..000000000000 --- a/dev-python/sqlalchemy/files/sqlalchemy-pytest-deprecation.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 993e6449e3f5f3532f6f5426b824718435ce6c6d Mon Sep 17 00:00:00 2001 -From: Mike Bayer <mike_mp@zzzcomputing.com> -Date: Thu, 12 Mar 2020 19:44:37 -0400 -Subject: [PATCH] Dont raise on pytest deprecation warnings - -py.test 5.4.0 emits deprecation warnings for pytest.Class. -make sure we don't raise for these, and log the code that will -be used for 5.4.0 when we bump requirements. - -Fixes: #5201 -Change-Id: I83e0402c4a6b2365a63b58d052c6989df3a37328 ---- - lib/sqlalchemy/testing/plugin/pytestplugin.py | 13 +++++++++++++ - lib/sqlalchemy/testing/warnings.py | 9 +++++++++ - 3 files changed, 29 insertions(+) - -diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py -index c39f9f32e..f2e7d706f 100644 ---- a/lib/sqlalchemy/testing/plugin/pytestplugin.py -+++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py -@@ -160,6 +160,11 @@ def pytest_collection_modifyitems(session, config, items): - if sub_cls is not test_class.cls: - per_cls_dict = rebuilt_items[test_class.cls] - -+ # in pytest 5.4.0 -+ # for inst in pytest.Class.from_parent( -+ # test_class.parent.parent, name=sub_cls.__name__ -+ # ).collect(): -+ - for inst in pytest.Class( - sub_cls.__name__, parent=test_class.parent.parent - ).collect(): -@@ -188,6 +193,14 @@ def pytest_collection_modifyitems(session, config, items): - def pytest_pycollect_makeitem(collector, name, obj): - - if inspect.isclass(obj) and plugin_base.want_class(name, obj): -+ -+ # in pytest 5.4.0 -+ # return [ -+ # pytest.Class.from_parent(collector, -+ # name=parametrize_cls.__name__) -+ # for parametrize_cls in _parametrize_cls(collector.module, obj) -+ # ] -+ - return [ - pytest.Class(parametrize_cls.__name__, parent=collector) - for parametrize_cls in _parametrize_cls(collector.module, obj) -diff --git a/lib/sqlalchemy/testing/warnings.py b/lib/sqlalchemy/testing/warnings.py -index cc11e556c..6b42c98cb 100644 ---- a/lib/sqlalchemy/testing/warnings.py -+++ b/lib/sqlalchemy/testing/warnings.py -@@ -34,6 +34,15 @@ def setup_filters(): - # ignore 2.0 warnings unless we are explicitly testing for them - warnings.filterwarnings("ignore", category=sa_exc.RemovedIn20Warning) - -+ try: -+ import pytest -+ except ImportError: -+ pass -+ else: -+ warnings.filterwarnings( -+ "once", category=pytest.PytestDeprecationWarning -+ ) -+ - - def assert_warnings(fn, warning_msgs, regex=False): - """Assert that each of the given warnings are emitted by fn. diff --git a/dev-python/sqlalchemy/metadata.xml b/dev-python/sqlalchemy/metadata.xml index c94fc8af5aeb..c09a95e459e1 100644 --- a/dev-python/sqlalchemy/metadata.xml +++ b/dev-python/sqlalchemy/metadata.xml @@ -7,5 +7,7 @@ </maintainer> <upstream> <remote-id type="pypi">SQLAlchemy</remote-id> + <remote-id type="github">sqlalchemy/sqlalchemy</remote-id> + <bugs-to>https://github.com/sqlalchemy/sqlalchemy/issues</bugs-to> </upstream> </pkgmetadata> diff --git a/dev-python/sqlalchemy/sqlalchemy-1.3.11.ebuild b/dev-python/sqlalchemy/sqlalchemy-1.3.11.ebuild deleted file mode 100644 index ede4b5dfa758..000000000000 --- a/dev-python/sqlalchemy/sqlalchemy-1.3.11.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7,8} pypy3 ) -PYTHON_REQ_USE="sqlite?" - -inherit distutils-r1 flag-o-matic optfeature - -MY_PN="SQLAlchemy" -MY_P="${MY_PN}-${PV/_beta/b}" - -DESCRIPTION="Python SQL toolkit and Object Relational Mapper" -HOMEPAGE="https://www.sqlalchemy.org/ https://pypi.org/project/SQLAlchemy/" -SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" -IUSE="doc examples +sqlite test" - -REQUIRED_USE="test? ( sqlite )" - -BDEPEND=" - test? ( - dev-python/mock[${PYTHON_USEDEP}] - dev-python/pytest-xdist[${PYTHON_USEDEP}] - ) -" - -S="${WORKDIR}/${MY_P}" - -distutils_enable_tests pytest - -python_prepare_all() { - local PATCHES=( - "${FILESDIR}"/sqlalchemy-pytest-deprecation.patch - ) - # Disable tests hardcoding function call counts specific to Python versions. - rm -r test/aaa_profiling || die - distutils-r1_python_prepare_all -} - -python_compile() { - if ! python_is_python3; then - local CFLAGS=${CFLAGS} - append-cflags -fno-strict-aliasing - fi - distutils-r1_python_compile -} - -python_install_all() { - use doc && HTML_DOCS=( doc/. ) - use examples && dodoc -r examples - - distutils-r1_python_install_all -} - -pkg_postinst() { - optfeature "MySQL support" dev-python/mysql-python dev-python/mysql-connector-python - optfeature "mssql support" dev-python/pymssql - optfeature "postgresql support" dev-python/psycopg:2 -} diff --git a/dev-python/sqlalchemy/sqlalchemy-1.3.17.ebuild b/dev-python/sqlalchemy/sqlalchemy-1.3.17.ebuild index 9ae4dbf92750..626ce4bdced0 100644 --- a/dev-python/sqlalchemy/sqlalchemy-1.3.17.ebuild +++ b/dev-python/sqlalchemy/sqlalchemy-1.3.17.ebuild @@ -30,7 +30,6 @@ BDEPEND=" " distutils_enable_tests pytest -distutils_enable_sphinx doc python_prepare_all() { # Disable tests hardcoding function call counts specific to Python versions. diff --git a/dev-python/sqlalchemy/sqlalchemy-1.3.20.ebuild b/dev-python/sqlalchemy/sqlalchemy-1.3.20.ebuild new file mode 100644 index 000000000000..f26552230414 --- /dev/null +++ b/dev-python/sqlalchemy/sqlalchemy-1.3.20.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( pypy3 python3_{6..9} ) +PYTHON_REQ_USE="sqlite?" + +inherit distutils-r1 optfeature + +MY_PN="SQLAlchemy" +MY_P="${MY_PN}-${PV/_beta/b}" + +DESCRIPTION="Python SQL toolkit and Object Relational Mapper" +HOMEPAGE="https://www.sqlalchemy.org/ https://pypi.org/project/SQLAlchemy/" +SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" +IUSE="examples +sqlite test" + +REQUIRED_USE="test? ( sqlite )" + +# Use pytest-xdist to speed up tests +BDEPEND=" + test? ( + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + # Ported part of those commits to fix failing tests: + # https://github.com/sqlalchemy/sqlalchemy/commit/c68f9fb87868c45fcadcc942ce4a35f10ff2f7ea + # https://github.com/sqlalchemy/sqlalchemy/commit/a9b068ae564e5e775e312373088545b75aeaa1b0 + # https://github.com/sqlalchemy/sqlalchemy/commit/9e31fc74089cf565df5f275d22eb8ae5414d6e45 + "${FILESDIR}/${P}-pypy3.patch" +) + +distutils_enable_tests pytest + +python_test() { + # Use all CPUs with pytest-xdist + pytest -n auto -vv || die "Tests failed with ${EPYTHON}" +} + +python_prepare_all() { + # Disable tests hardcoding function call counts specific to Python versions. + rm -r test/aaa_profiling || die + distutils-r1_python_prepare_all +} + +python_install_all() { + if use examples; then + docompress -x "/usr/share/doc/${PF}/examples" + dodoc -r examples + fi + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "MySQL support" dev-python/mysqlclient dev-python/pymysql \ + dev-python/mysql-connector-python + optfeature "mssql support" dev-python/pymssql + optfeature "postgresql support" dev-python/psycopg:2 +} |