mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 21:08:35 -07:00
dev-python/sqlalchemy: Clean old
obsoletes Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=481426 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=481634 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=489488 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=546892 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=547260 Package-Manager: portage-2.2.25 Signed-off-by: Justin Lecher <jlec@gentoo.org>
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
DIST SQLAlchemy-0.7.10.tar.gz 3541639 SHA256 77aa39d65c9d043eba6ba329b359ff867424fd6c403b7c0cb112b65e507e1d66 SHA512 631bc4ffb419defa531a66d82449fe48f93c88371ba0b8ab4217d900a0d1d90efe9699d8a9048d5c2ed33948c6d2f7cae46452ee45d442914018f3361e804367 WHIRLPOOL 74ffc17efbcbb2ac67712b9e11aa48431d18970f46ae5985aaa345aa8691f96e4acc4cf6fa37606699fbba83fcb7f74b0360fea2ac5e93a451585019e110f2ed
|
||||
DIST SQLAlchemy-0.9.2.tar.gz 4389966 SHA256 1411b6e93446350e533ed0b892ba5cbce9afdfab8ce09f060add8ada8911e1ee SHA512 1d4baa0ea02e4f6ee70ff00dbda77c6c814adab6f45df89765123045ced4d65bceb9c7640aa16b60e45887d4454584d49f4a5b06db0fbd9f7770cf78da5ecda3 WHIRLPOOL 79e06d8987dad3bd12cc412980978f670888595b6e7805e17ccc3f0face39d5500b6299a81f5424fe7a77005e928d88e3eec34300075c03a4d788b19c47be2c3
|
||||
DIST SQLAlchemy-0.9.8.tar.gz 4080098 SHA256 de3ac04ecab0a7e0af64eee30a71e723ba5886b958205f7354dd62439da60389 SHA512 3df7d7a64cdfe7b684be98e7e9d6836da54c391343bb047224a11df888041034bcc54cc30d15dc3d56b5d397b35e6aabe5732e7ca8fbf553bd8d98731c249ea5 WHIRLPOOL 2cedf7713753a6cf8838741fcf06c5510387aa4e661ea3c0ecc2bb7bdb5b03fb90f072ccd1a5671f03943952340c6c3525836e1ebe9246506143b055a1ca1991
|
||||
DIST SQLAlchemy-0.9.9.tar.gz 4213948 SHA256 72a51f6ae99116ea969381f65fe471aafe14c21f6760f259b46f919f21345f91 SHA512 a28c83645ddddc17825f7d76443350ef22b23be72524aeb22665b4f8b92e0bf7dd79f9628841732973a565f5edb64b687f9e49daa1af11b1778b854b66728fa0 WHIRLPOOL e60a8ef79da0547b58a53c5f567e6abeba7408cd4cc398feaa7c61dcad7fa344dd31691fee25d4738bc25bb956ecf2b20cbeb6caf29114066dfbec26c2f07695
|
||||
DIST SQLAlchemy-1.0.5.tar.gz 4600531 SHA256 b57d3a35c39ed956e3002118a51502918b2fd357eca7523a6b50ef8d329a29be SHA512 d898c2b74132a3f1ea9c2aecd761af6788f6dc2c76b471dfed5b0c6f69eb273b6b4602028ad0a142129311be08da97d74d277db2150c169c51385bb7d28f843e WHIRLPOOL 204c8079ca8a2ab43e363f3e8ea0dbc436e12ec9c7dd0bc9201eef85e9d7717084c38e4655def400c19706c9c80f91baed9bee2c206e670ae8de030be27ed167
|
||||
DIST SQLAlchemy-1.0.6.tar.gz 4615939 SHA256 99a8a54bec4988f704c54ee9f769aa196db43a5ef7ed655b78a80a129c9c65f3 SHA512 188e2ce1c38819318c7561fa2cc663a8421ea6869abd2b0b355986b8326c481a62cd073a52cb90ad967cbcc7c2bfe64aecee2280423a40b4bc23f779c92bcd63 WHIRLPOOL d5a4035d21c74378e162719ba3b09d5554e218aefe273d9676158e2c02715a827edeb652714a7964d19cacacf45436b4ca1ef490ce6ff9631362f53a6a1c5190
|
||||
DIST SQLAlchemy-1.0.8.tar.gz 4627601 SHA256 950c79c0abf9e9f99c43c627c51d40d14a946810a90c35e7cd827bfd0bffe46f SHA512 921f847a20548095cb1f41fe6147b393110e08f8f3ff0aee6081e7811e7c15b3c03583afd41ddf5aacdc1dde090c0512afb94c7cc33d9c27135a5525ed121e74 WHIRLPOOL 757f2a3832c8fefd5789cd981eb1b2028419362ed2714927198df6b91742236896d4ab0131969afa08e5508843e32e018a1361e28df3f22a15f811d78275f8cf
|
||||
DIST SQLAlchemy-1.0.9.tar.gz 4662673 SHA256 c3d37501e36ec5d74c2d7b4a3764719db86a9cdab4a24431bf58b386743ab10e SHA512 5032977e4fd3ff12d7ae10ca87f0ec9cd2d9eb5d200020b74faad1309eb1de5bacc9b4f5e53cb1b0b0b9c7f59b923a87a12ba050b37a631f9c77af2b896eb076 WHIRLPOOL 5e824f8581b98ac26f47d0bc8ae706783602ebe6bf921c6767f46db83b8322b022ea51603d1002017052144946256583c4fd9d2a92742c752333b530ed356121
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 405c223ae50e78dacac08783c414619db20df0b7 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Bayer <mike_mp@zzzcomputing.com>
|
||||
Date: Tue, 29 Jul 2014 13:32:05 -0400
|
||||
Subject: [PATCH] - Fixed 0.9.7 regression caused by :ticket:`3067` in
|
||||
conjunction with a mis-named unit test such that so-called "schema" types
|
||||
like :class:`.Boolean` and :class:`.Enum` could no longer be pickled. fixes
|
||||
#3144
|
||||
|
||||
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
|
||||
index 6114460..6cbf583 100644
|
||||
--- a/lib/sqlalchemy/sql/elements.py
|
||||
+++ b/lib/sqlalchemy/sql/elements.py
|
||||
@@ -3276,6 +3276,9 @@ class _defer_name(_truncated_label):
|
||||
else:
|
||||
return super(_defer_name, cls).__new__(cls, value)
|
||||
|
||||
+ def __reduce__(self):
|
||||
+ return self.__class__, (util.text_type(self), )
|
||||
+
|
||||
|
||||
class _defer_none_name(_defer_name):
|
||||
"""indicate a 'deferred' name that was ultimately the value None."""
|
||||
diff --git a/test/sql/test_types.py b/test/sql/test_types.py
|
||||
index 03d3997..efa0f90 100644
|
||||
--- a/test/sql/test_types.py
|
||||
+++ b/test/sql/test_types.py
|
||||
@@ -234,9 +234,9 @@ class TypeAffinityTest(fixtures.TestBase):
|
||||
assert t1.dialect_impl(d)._type_affinity is postgresql.UUID
|
||||
|
||||
|
||||
-class PickleMetadataTest(fixtures.TestBase):
|
||||
+class PickleTypesTest(fixtures.TestBase):
|
||||
|
||||
- def testmeta(self):
|
||||
+ def test_pickle_types(self):
|
||||
for loads, dumps in picklers():
|
||||
column_types = [
|
||||
Column('Boo', Boolean()),
|
||||
@@ -1,33 +0,0 @@
|
||||
diff -r d1c7b3df098a lib/sqlalchemy/util/_collections.py
|
||||
|
||||
Index: lib/sqlalchemy/util/_collections.py
|
||||
===================================================================
|
||||
--- a/lib/sqlalchemy/util/_collections.py Wed Jan 18 12:42:54 2012 -0500
|
||||
+++ b/lib/sqlalchemy/util/_collections.py Thu Jan 19 10:01:28 2012 -0500
|
||||
@@ -769,10 +769,15 @@
|
||||
def __init__(self, capacity=100, threshold=.5):
|
||||
self.capacity = capacity
|
||||
self.threshold = threshold
|
||||
+ self._counter = 0
|
||||
+
|
||||
+ def _inc_counter(self):
|
||||
+ self._counter += 1
|
||||
+ return self._counter
|
||||
|
||||
def __getitem__(self, key):
|
||||
item = dict.__getitem__(self, key)
|
||||
- item[2] = time_func()
|
||||
+ item[2] = self._inc_counter()
|
||||
return item[1]
|
||||
|
||||
def values(self):
|
||||
@@ -788,7 +793,7 @@
|
||||
def __setitem__(self, key, value):
|
||||
item = dict.get(self, key)
|
||||
if item is None:
|
||||
- item = [key, value, time_func()]
|
||||
+ item = [key, value, self._inc_counter()]
|
||||
dict.__setitem__(self, key, item)
|
||||
else:
|
||||
item[1] = value
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
https://bitbucket.org/sqlalchemy/sqlalchemy/pull-request/41
|
||||
--- a/test/engine/test_execute.py
|
||||
+++ b/test/engine/test_execute.py
|
||||
@@ -9,7 +9,7 @@
|
||||
import sqlalchemy as tsa
|
||||
from test.lib import testing, engines
|
||||
from test.lib.engines import testing_engine
|
||||
-import logging
|
||||
+import logging, logging.handlers
|
||||
from sqlalchemy.dialects.oracle.zxjdbc import ReturningParam
|
||||
from sqlalchemy.engine import base, default
|
||||
from sqlalchemy.engine.base import Connection, Engine
|
||||
@@ -1,50 +0,0 @@
|
||||
# http://www.sqlalchemy.org/trac/ticket/2719
|
||||
diff -ur SQLAlchemy-0.8.1.orig/test/ext/test_serializer.py SQLAlchemy-0.8.1/test/ext/test_serializer.py
|
||||
--- test/ext/test_serializer.py 2013-04-28 05:24:34.000000000 +0800
|
||||
+++ test/ext/test_serializer.py 2013-05-02 01:02:25.376203511 +0800
|
||||
@@ -114,6 +114,7 @@
|
||||
Address(email='ed@lala.com'),
|
||||
Address(email='ed@bettyboop.com')])
|
||||
|
||||
+ @testing.skip_if(lambda: util.pypy, "problems with pypy pickle reported")
|
||||
def test_query_two(self):
|
||||
q = \
|
||||
Session.query(User).join(User.addresses).\
|
||||
@@ -123,6 +124,7 @@
|
||||
eq_(q2.all(), [User(name='fred')])
|
||||
eq_(list(q2.values(User.id, User.name)), [(9, u'fred')])
|
||||
|
||||
+ @testing.skip_if(lambda: util.pypy, "problems with pypy pickle reported")
|
||||
def test_query_three(self):
|
||||
ua = aliased(User)
|
||||
q = \
|
||||
@@ -136,6 +138,7 @@
|
||||
ua_2 = q2._entities[0].entity_zero.entity
|
||||
eq_(list(q2.values(ua_2.id, ua_2.name)), [(9, u'fred')])
|
||||
|
||||
+ @testing.skip_if(lambda: util.pypy, "problems with pypy pickle reported")
|
||||
def test_orm_join(self):
|
||||
from sqlalchemy.orm.util import join
|
||||
|
||||
diff -ur SQLAlchemy-0.8.1.orig/test/orm/test_manytomany.py SQLAlchemy-0.8.1/test/orm/test_manytomany.py
|
||||
--- test/orm/test_manytomany.py 2013-04-28 05:24:34.000000000 +0800
|
||||
+++ test/orm/test_manytomany.py 2013-05-02 01:05:08.073213015 +0800
|
||||
@@ -233,6 +233,9 @@
|
||||
p2 = Place('place2')
|
||||
p3 = Place('place3')
|
||||
|
||||
+ sess = Session()
|
||||
+ sess.add_all([p3, p1, t1, t2, p2, t3])
|
||||
+
|
||||
t1.inputs.append(p1)
|
||||
t1.inputs.append(p2)
|
||||
t1.outputs.append(p3)
|
||||
@@ -240,8 +243,6 @@
|
||||
p2.inputs.append(t2)
|
||||
p3.inputs.append(t2)
|
||||
p1.outputs.append(t1)
|
||||
- sess = Session()
|
||||
- sess.add_all((t1, t2, t3, p1, p2, p3))
|
||||
sess.commit()
|
||||
|
||||
self.assert_result([t1],
|
||||
@@ -1,68 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
# py3 appears underdone,
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit distutils-r1 eutils flag-o-matic
|
||||
|
||||
MY_PN="SQLAlchemy"
|
||||
MY_P="${MY_PN}-${PV/_}"
|
||||
|
||||
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
|
||||
HOMEPAGE="http://www.sqlalchemy.org/ https://pypi.python.org/pypi/SQLAlchemy"
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm hppa ia64 ~ppc ~ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc examples firebird mssql mysql postgres +sqlite test"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
firebird? ( dev-python/kinterbasdb )
|
||||
mssql? ( dev-python/pymssql )
|
||||
mysql? ( dev-python/mysql-python )
|
||||
postgres? ( >=dev-python/psycopg-2 )
|
||||
sqlite? (
|
||||
>=dev-db/sqlite-3.3.13 )"
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
>=dev-db/sqlite-3.3.13
|
||||
>=dev-python/nose-0.10.4[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-0.7-logging.handlers.patch" )
|
||||
|
||||
python_prepare_all() {
|
||||
# Disable tests hardcoding function call counts specific to Python versions.
|
||||
rm -fr test/aaa_profiling
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_configure_all() {
|
||||
append-flags -fno-strict-aliasing
|
||||
}
|
||||
|
||||
python_test() {
|
||||
"${PYTHON}" sqla_nose.py || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
|
||||
if use doc; then
|
||||
pushd doc > /dev/null
|
||||
rm -fr build
|
||||
dohtml -r [a-z]* _images _static
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r examples
|
||||
fi
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_7,3_3} pypy )
|
||||
PYTHON_REQ_USE="sqlite?"
|
||||
|
||||
inherit distutils-r1 eutils flag-o-matic
|
||||
|
||||
MY_PN="SQLAlchemy"
|
||||
MY_P="${MY_PN}-${PV/_}"
|
||||
|
||||
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
|
||||
HOMEPAGE="http://www.sqlalchemy.org/ https://pypi.python.org/pypi/SQLAlchemy"
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc examples +sqlite test"
|
||||
REQUIRED_USE="test? ( sqlite )"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
sqlite? ( >=dev-db/sqlite-3.3.13 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
>=dev-db/sqlite-3.3.13
|
||||
>=dev-python/nose-0.10.4[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
)"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
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_compile() {
|
||||
if ! python_is_python3; then
|
||||
local CFLAGS=${CFLAGS}
|
||||
append-cflags -fno-strict-aliasing
|
||||
fi
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# Create copies of necessary files in BUILD_DIR.
|
||||
cp -pR examples sqla_nose.py setup.cfg test "${BUILD_DIR}" || die
|
||||
pushd "${BUILD_DIR}" > /dev/null
|
||||
if [[ "${EPYTHON}" == "python3.2" ]]; then
|
||||
2to3 --no-diffs -w test
|
||||
"${PYTHON}" sqla_nose.py -e test_reflect || die "Testsuite failed under ${EPYTHON}"
|
||||
else
|
||||
"${PYTHON}" sqla_nose.py || die "Testsuite failed under ${EPYTHON}"
|
||||
fi
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && HTML_DOCS=( doc/. )
|
||||
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version dev-python/mysql-python; then
|
||||
elog "For MySQL support, install dev-python/mysql-python"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/pymssql; then
|
||||
elog "For mssql support, install dev-python/pymssql"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/psycopg:2; then
|
||||
elog "For postgresql support, install dev-python/psycopg:2"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
|
||||
PYTHON_REQ_USE="sqlite?"
|
||||
|
||||
inherit distutils-r1 flag-o-matic
|
||||
|
||||
MY_PN="SQLAlchemy"
|
||||
MY_P="${MY_PN}-${PV/_}"
|
||||
|
||||
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
|
||||
HOMEPAGE="http://www.sqlalchemy.org/ https://pypi.python.org/pypi/SQLAlchemy"
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc examples +sqlite test"
|
||||
REQUIRED_USE="test? ( sqlite )"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-python/pytest[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7 pypy)
|
||||
)"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
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_compile() {
|
||||
if ! python_is_python3; then
|
||||
local CFLAGS=${CFLAGS}
|
||||
append-cflags -fno-strict-aliasing
|
||||
fi
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# Create copies of necessary files in BUILD_DIR.
|
||||
# https://bitbucket.org/zzzeek/sqlalchemy/issue/3144/
|
||||
cp -pR examples sqla_nose.py setup.cfg test "${BUILD_DIR}" || die
|
||||
pushd "${BUILD_DIR}" > /dev/null
|
||||
if [[ "${EPYTHON}" == "python3.2" ]]; then
|
||||
2to3 --no-diffs -w test
|
||||
fi
|
||||
# Recently upstream elected to make the testsuite also pytest capable
|
||||
# "${PYTHON}" sqla_nose.py || die "Testsuite failed under ${EPYTHON}"
|
||||
py.test test || die "Testsuite failed under ${EPYTHON}"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && HTML_DOCS=( doc/. )
|
||||
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version dev-python/mysql-python; then
|
||||
elog "For MySQL support, install dev-python/mysql-python"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/pymssql; then
|
||||
elog "For mssql support, install dev-python/pymssql"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/psycopg:2; then
|
||||
elog "For postgresql support, install dev-python/psycopg:2"
|
||||
fi
|
||||
fi
|
||||
|
||||
elog "mysql backend support can be enabled by installing mysql-python for cpython py2.7 only,"
|
||||
elog "or mysql-connector-python for support of cpythons 2.7 3.3 and 3.4"
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
|
||||
PYTHON_REQ_USE="sqlite?"
|
||||
|
||||
inherit distutils-r1 flag-o-matic
|
||||
|
||||
MY_PN="SQLAlchemy"
|
||||
MY_P="${MY_PN}-${PV/_beta/b}"
|
||||
|
||||
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
|
||||
HOMEPAGE="http://www.sqlalchemy.org/ https://pypi.python.org/pypi/SQLAlchemy"
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc examples +sqlite test"
|
||||
REQUIRED_USE="test? ( sqlite )"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-python/pytest[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7 pypy)
|
||||
)"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
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_compile() {
|
||||
if ! python_is_python3; then
|
||||
local CFLAGS=${CFLAGS}
|
||||
append-cflags -fno-strict-aliasing
|
||||
fi
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# Create copies of necessary files in BUILD_DIR.
|
||||
# https://bitbucket.org/zzzeek/sqlalchemy/issue/3144/
|
||||
cp -pR examples sqla_nose.py setup.cfg test "${BUILD_DIR}" || die
|
||||
pushd "${BUILD_DIR}" > /dev/null
|
||||
if [[ "${EPYTHON}" == "python3.2" ]]; then
|
||||
2to3 --no-diffs -w test
|
||||
fi
|
||||
# Recently upstream elected to make the testsuite also pytest capable
|
||||
# "${PYTHON}" sqla_nose.py || die "Testsuite failed under ${EPYTHON}"
|
||||
py.test test || die "Testsuite failed under ${EPYTHON}"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && HTML_DOCS=( doc/. )
|
||||
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version dev-python/mysql-python; then
|
||||
elog "For MySQL support, install dev-python/mysql-python"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/pymssql; then
|
||||
elog "For mssql support, install dev-python/pymssql"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/psycopg:2; then
|
||||
elog "For postgresql support, install dev-python/psycopg:2"
|
||||
fi
|
||||
fi
|
||||
|
||||
elog "mysql backend support can be enabled by installing mysql-python for cpython py2.7 only,"
|
||||
elog "or mysql-connector-python for support of cpythons 2.7 3.3 and 3.4"
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
|
||||
PYTHON_REQ_USE="sqlite?"
|
||||
|
||||
inherit distutils-r1 flag-o-matic
|
||||
|
||||
MY_PN="SQLAlchemy"
|
||||
MY_P="${MY_PN}-${PV/_beta/b}"
|
||||
|
||||
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
|
||||
HOMEPAGE="http://www.sqlalchemy.org/ https://pypi.python.org/pypi/SQLAlchemy"
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc examples +sqlite test"
|
||||
REQUIRED_USE="test? ( sqlite )"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-python/pytest[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7 pypy)
|
||||
)"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
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_compile() {
|
||||
if ! python_is_python3; then
|
||||
local CFLAGS=${CFLAGS}
|
||||
append-cflags -fno-strict-aliasing
|
||||
fi
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# Create copies of necessary files in BUILD_DIR.
|
||||
# https://bitbucket.org/zzzeek/sqlalchemy/issue/3144/
|
||||
cp -pR examples sqla_nose.py setup.cfg test "${BUILD_DIR}" || die
|
||||
pushd "${BUILD_DIR}" > /dev/null
|
||||
if [[ "${EPYTHON}" == "python3.2" ]]; then
|
||||
2to3 --no-diffs -w test
|
||||
fi
|
||||
# Recently upstream elected to make the testsuite also pytest capable
|
||||
# "${PYTHON}" sqla_nose.py || die "Testsuite failed under ${EPYTHON}"
|
||||
py.test test || die "Testsuite failed under ${EPYTHON}"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && HTML_DOCS=( doc/. )
|
||||
|
||||
use examples && local EXAMPLES=( examples/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version dev-python/mysql-python; then
|
||||
elog "For MySQL support, install dev-python/mysql-python"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/pymssql; then
|
||||
elog "For mssql support, install dev-python/pymssql"
|
||||
fi
|
||||
|
||||
if ! has_version dev-python/psycopg:2; then
|
||||
elog "For postgresql support, install dev-python/psycopg:2"
|
||||
fi
|
||||
fi
|
||||
|
||||
elog "mysql backend support can be enabled by installing mysql-python for cpython py2.7 only,"
|
||||
elog "or mysql-connector-python for support of cpythons 2.7 3.3 and 3.4"
|
||||
}
|
||||
Reference in New Issue
Block a user