diff options
-rw-r--r-- | dev-python/sqlalchemy/Manifest | 1 | ||||
-rw-r--r-- | dev-python/sqlalchemy/sqlalchemy-1.3.21.ebuild | 67 |
2 files changed, 68 insertions, 0 deletions
diff --git a/dev-python/sqlalchemy/Manifest b/dev-python/sqlalchemy/Manifest index 051c2b70a88b..58370d601971 100644 --- a/dev-python/sqlalchemy/Manifest +++ b/dev-python/sqlalchemy/Manifest @@ -1,2 +1,3 @@ DIST SQLAlchemy-1.3.17.tar.gz 5979141 BLAKE2B f0fa46493461f532ebca9420fc9f49a2c04af888aa99653946a5bb563d40b8bb714a03301300ebb80cca76a99f8226ddfcde4216e8fc2593d3a161b5072276ab SHA512 6f6d54b9018ece6c289f28a3a41ffb1b2216206edee08c49f387e9f30740969dfe0f8272654ce4efca159a2a6619e76c41b2ad2b10c391cdd64681ac17d0bc79 DIST SQLAlchemy-1.3.20.tar.gz 6264898 BLAKE2B 4c386eff56c2f9ec7ef467e3bc0032629582a970707dc11e3744fe3903d9cb18457f5e0be4dc9c20727b5733f158e031bf8b40f586dadb8f4ab8d0cae3cf7398 SHA512 29c52ada1a66f906ed2563df2ab093eceb7c09de45749c96031f30a1512d20b1d698e00640c777169ef3db99ab012151770a3daea45a51df934269b554ff4b28 +DIST SQLAlchemy-1.3.21.tar.gz 6297278 BLAKE2B 39bd440eec25adc3ec81eaf55d2b97ecb328da4fd6e78dca17a94548a34336a8ef01a1dd0b4565794f4647d3bb4a98803873990c2e0df865216ed57fbe67ba1c SHA512 50ea60b849e6f043507728482dc1a90faea853c3fb16affe1d68197903578cb31f26b3543f4671be6aec2a705343193bfa7579e8d417e74c92ee104af4fba753 diff --git a/dev-python/sqlalchemy/sqlalchemy-1.3.21.ebuild b/dev-python/sqlalchemy/sqlalchemy-1.3.21.ebuild new file mode 100644 index 000000000000..61033328f457 --- /dev/null +++ b/dev-python/sqlalchemy/sqlalchemy-1.3.21.ebuild @@ -0,0 +1,67 @@ +# 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" + +# Use pytest-xdist to speed up tests +BDEPEND=" + test? ( + $(python_gen_impl_dep sqlite) + 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}/sqlalchemy-1.3.20-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 +} |