summaryrefslogtreecommitdiff
path: root/dev-python/alembic
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-python/alembic
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-python/alembic')
-rw-r--r--dev-python/alembic/Manifest7
-rw-r--r--dev-python/alembic/alembic-1.4.3.ebuild (renamed from dev-python/alembic/alembic-1.4.2.ebuild)33
-rw-r--r--dev-python/alembic/files/alembic-1.4.3-pytest6.patch66
-rw-r--r--dev-python/alembic/metadata.xml19
4 files changed, 97 insertions, 28 deletions
diff --git a/dev-python/alembic/Manifest b/dev-python/alembic/Manifest
index d704563cf949..617c2de0cb67 100644
--- a/dev-python/alembic/Manifest
+++ b/dev-python/alembic/Manifest
@@ -1,3 +1,4 @@
-DIST alembic-1.4.2.tar.gz 1092045 BLAKE2B 5f4001a756aacbb4db509669bc0d4d7c59c38e2983c433283243efa97bf28a22e38bcfd28a4bc72573e8ab78d6590e78f4e12a5b9dd08b60cf5a84520b955056 SHA512 82bdfe442c19033aa2b802ec49edd13ed265c00a2b5a048490a83ffa8e53587c56a90b64d554e746a9189923419c528482cb7a7c950c210e0de47b32fa7c270e
-EBUILD alembic-1.4.2.ebuild 1238 BLAKE2B 5a5da57b46f0319206b4952bfc70d1b856c481013732c7134c149a114499198f60304c3b64600e2d8a0070c48e9e2bcf7a4bb6353b279fa305d8618e62a66034 SHA512 40108caa1b6da70fd4691f61d0a70e64bc55610df26da4a6c77e62beeb8b52967d209adaba50f776e97bdbf0a4bb994d5378de2ce79d7ff56a640562b2e0f247
-MISC metadata.xml 379 BLAKE2B 8fcdef99cd9d57757692cf72b6f43bf874b7657899197d754ad81866f77d0a48d0fdaf168eeb37ad29ec975ddd7533be90f1e9926de9faf1bb56c3ad4e1d7513 SHA512 809c3f1585e85726feefc7f8493ec83ee31a9f7aa99aacf82026742f278726ad960a63b40c701a1a2453d46fd64d8245b83f2bd7511b5cc077c44bc62dda3e83
+AUX alembic-1.4.3-pytest6.patch 2379 BLAKE2B 3c43194ce234703b10e87a8d8746efef96b317b1d23fbd19c1cea4a8809bf68e0a3908314948afb61f5b8081ac021d51d329c4b064f026ce33ed8ffe2919fb3d SHA512 390f3a605649c0c927edb2746906b703cf293879e9cc18be6a87a646ddb8032eeba837f7c4df4a9d82187bd9bb3af5955a815df3428e966ec7b4e7e8fb43de87
+DIST alembic-1.4.3.tar.gz 1108131 BLAKE2B d9c8b6d6aebce7a45194dd6c654f4a2627714a5c1f7cb7a1cf80ed8c3fe861e3bb7857811128787ddd6c093b4370784b40cddb385cfbd30f6134d537fe949d2d SHA512 925d8957fd9008d041737a9e79ec8d7a4c5deba1976e980362d355a75348c1638d783d9d48234a5bc3b2dc3f2f09dcb281d0c80ae0f0c5bc32e176c3dfa05463
+EBUILD alembic-1.4.3.ebuild 1097 BLAKE2B fd2e3a637f3e5ac2ab9c99ca604202bb166de1fb228e9f01c599d421477f9ee1f3238d776077ff6572b92ead31d810189ae6e0248061f6d5b9f2d248ffb05095 SHA512 ef525cc7ef1390e7416e0472cf0922c7d281875a257a0bd5321f3ce376a3d91a0815081064da999d71e6b9144612e17dd0a7be097057241878b7ed442888df59
+MISC metadata.xml 515 BLAKE2B 219e6908903fd35cdc826ecf6dd46ad0e55996c4e674274b7840a9f04e50b19c9cdf24f0af66a9ea6782caeba7b7b0f0286c43055f25c638fda443fcf5a04f2e SHA512 8fe0d55be255a8f486693b026de9d9f934baf1ac6b927a743fdb8170bb52a32a1a0ae57b1b8c7e30ad8921e2dbae7af560a8942c801aec88d4c3b2544fd66319
diff --git a/dev-python/alembic/alembic-1.4.2.ebuild b/dev-python/alembic/alembic-1.4.3.ebuild
index e014e8a05278..5c69b224f82f 100644
--- a/dev-python/alembic/alembic-1.4.2.ebuild
+++ b/dev-python/alembic/alembic-1.4.3.ebuild
@@ -3,30 +3,33 @@
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( pypy3 python3_{6..9} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
inherit distutils-r1
DESCRIPTION="database migrations tool, written by the author of SQLAlchemy"
-HOMEPAGE="https://bitbucket.org/zzzeek/alembic"
+HOMEPAGE="https://github.com/sqlalchemy/alembic"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
-IUSE="test doc"
-RESTRICT="!test? ( test )"
+IUSE="doc"
-RDEPEND=">=dev-python/sqlalchemy-1.1.0[${PYTHON_USEDEP}]
+RDEPEND="
+ >=dev-python/sqlalchemy-1.1.0[${PYTHON_USEDEP}]
dev-python/mako[${PYTHON_USEDEP}]
>=dev-python/python-editor-0.3[${PYTHON_USEDEP}]
- dev-python/python-dateutil[${PYTHON_USEDEP}]"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
- test? ( ${RDEPEND}
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/nose[${PYTHON_USEDEP}]
- dev-python/mock[${PYTHON_USEDEP}] )"
-# For test phase
-DISTUTILS_IN_SOURCE_BUILD=1
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ # https://github.com/sqlalchemy/alembic/commit/8690940976544f368dad31cfbc46d9e1426b2ce1
+ "${FILESDIR}/${P}-pytest6.patch"
+)
+
+distutils_enable_tests pytest
python_prepare_all() {
# suite passes all if run from source. The residual fail & error are quite erroneous
@@ -35,10 +38,6 @@ python_prepare_all() {
distutils-r1_python_prepare_all
}
-python_test() {
- ${EPYTHON} -m pytest --dropfirst || die "Testing failed with ${EPYTHON}"
-}
-
python_install_all() {
use doc && local HTML_DOCS=( docs/. )
diff --git a/dev-python/alembic/files/alembic-1.4.3-pytest6.patch b/dev-python/alembic/files/alembic-1.4.3-pytest6.patch
new file mode 100644
index 000000000000..ecf21a7ca58f
--- /dev/null
+++ b/dev-python/alembic/files/alembic-1.4.3-pytest6.patch
@@ -0,0 +1,66 @@
+From 8690940976544f368dad31cfbc46d9e1426b2ce1 Mon Sep 17 00:00:00 2001
+From: Mike Bayer <mike_mp@zzzcomputing.com>
+Date: Sat, 26 Sep 2020 21:05:53 -0400
+Subject: [PATCH] Support pytest 6.x
+
+pytest has removed support for pytest.Class(..parent)
+and we need to use from_parent.
+
+Also works around new issue for 6.1.0
+
+References: https://github.com/pytest-dev/pytest/issues/7807
+
+Change-Id: Ia5fed9b22e76c99f71489283acee207f996f52a4
+---
+ alembic/__init__.py | 2 +-
+ alembic/testing/plugin/pytestplugin.py | 10 ++--------
+ tox.ini | 4 ++--
+ 3 files changed, 5 insertions(+), 11 deletions(-)
+
+ sys.modules["alembic.migration"] = migration
+ sys.modules["alembic.environment"] = environment
+diff --git a/alembic/testing/plugin/pytestplugin.py b/alembic/testing/plugin/pytestplugin.py
+index 1c8be05..ba3d35b 100644
+--- a/alembic/testing/plugin/pytestplugin.py
++++ b/alembic/testing/plugin/pytestplugin.py
+@@ -33,16 +33,10 @@ def pytest_configure(config):
+ 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)
+- # ]
++ ctor = getattr(pytest.Class, "from_parent", pytest.Class)
+
+ return [
+- pytest.Class(parametrize_cls.__name__, parent=collector)
++ ctor(name=parametrize_cls.__name__, parent=collector)
+ for parametrize_cls in _parametrize_cls(collector.module, obj)
+ ]
+ elif (
+diff --git a/tox.ini b/tox.ini
+index ed233ee..f144754 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -7,7 +7,7 @@ SQLA_REPO = {env:SQLA_REPO:git+https://github.com/sqlalchemy/sqlalchemy.git}
+ [testenv]
+ cov_args=--cov=alembic --cov-report term --cov-report xml
+
+-deps=pytest!=3.9.1,!=3.9.2
++deps=pytest>4.6
+ pytest-xdist
+ mock
+ sqla11: {[tox]SQLA_REPO}@rel_1_1
+@@ -30,7 +30,7 @@ usedevelop=
+ # only use --dropfirst option if we're *not* using -n;
+ # if -n is used, we're working in brand new DBs anyway
+ setenv=
+- BASECOMMAND=python -m pytest
++ BASECOMMAND=python -m pytest --rootdir {toxinidir}
+ WORKERS=-n4
+ sqla079: WORKERS=--dropfirst
+ cov: COVERAGE={[testenv]cov_args}
diff --git a/dev-python/alembic/metadata.xml b/dev-python/alembic/metadata.xml
index 4d8c6d6bf676..c0975d18b1f0 100644
--- a/dev-python/alembic/metadata.xml
+++ b/dev-python/alembic/metadata.xml
@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>python@gentoo.org</email>
- <name>Python</name>
- </maintainer>
- <upstream>
- <remote-id type="pypi">alembic</remote-id>
- <remote-id type="bitbucket">zzzeek/alembic</remote-id>
- </upstream>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <remote-id type="pypi">alembic</remote-id>
+ <remote-id type="github">sqlalchemy/alembic</remote-id>
+ <remote-id type="bitbucket">zzzeek/alembic</remote-id>
+ <bugs-to>https://github.com/sqlalchemy/alembic/issues</bugs-to>
+ </upstream>
</pkgmetadata>