diff options
-rw-r--r-- | dev-python/pymssql/Manifest | 1 | ||||
-rw-r--r-- | dev-python/pymssql/files/pymssql-2.1.3-DBVERSION_80.patch | 13 | ||||
-rw-r--r-- | dev-python/pymssql/files/pymssql-2.1.3-remove-setuptools_git.patch | 10 | ||||
-rw-r--r-- | dev-python/pymssql/pymssql-2.1.3.ebuild | 47 |
4 files changed, 71 insertions, 0 deletions
diff --git a/dev-python/pymssql/Manifest b/dev-python/pymssql/Manifest index 97366816ff25..37a497570e6e 100644 --- a/dev-python/pymssql/Manifest +++ b/dev-python/pymssql/Manifest @@ -1 +1,2 @@ DIST pymssql-1.0.2.tar.gz 175469 BLAKE2B a88c04be044478c2bec76a15e05ff751b961d253ca2e071ee8293c0899e091f96206a87486333f2543de609c7b38ff9e8a1a4ba7686625489bb9ed5c56e3cf19 SHA512 6e9a2d26f2cc33bac093f2a2a41771aa41ba336413076c793137558c05e48cea7409f74f35530939b36a708cc47c66ec0dc765a768bd5f857642553568fe859e +DIST pymssql-2.1.3.tar.gz 897987 BLAKE2B e105dd8d5dbbad5de566b9179f799ad66eb420f60464e8061470b1abb6ecf38f35ad7992ded40f2cd62c76a8e04255eb647e30df5c9bc4059334a1d5d4677e73 SHA512 a659cb8f077ddbe5e8de0b9b118d8bcc0c87128c0be4ff14343983e7029594e63ba6fb8a88992dc1f058df3c1ebbbd69cf371bf95a0918954cd0cec14c1cb5cb diff --git a/dev-python/pymssql/files/pymssql-2.1.3-DBVERSION_80.patch b/dev-python/pymssql/files/pymssql-2.1.3-DBVERSION_80.patch new file mode 100644 index 000000000000..9d72a9817358 --- /dev/null +++ b/dev-python/pymssql/files/pymssql-2.1.3-DBVERSION_80.patch @@ -0,0 +1,13 @@ +--- a/_mssql.pyx ++++ b/_mssql.pyx +@@ -34,6 +34,10 @@ DEF EXCOMM = 9 + # Provide constants missing in FreeTDS 0.82 so that we can build against it + DEF DBVERSION_71 = 5 + DEF DBVERSION_72 = 6 ++# See /usr/include/sybdb.h - DBVERSION_80 is not defined in FreeTDS 1.00.13 ++# (cf. http://www.freetds.org/userguide/choosingtdsprotocol.htm) ++# 8.0 was actually 7.1 so set it to the same value ++DEF DBVERSION_80 = 5 + + ROW_FORMAT_TUPLE = 1 + ROW_FORMAT_DICT = 2 diff --git a/dev-python/pymssql/files/pymssql-2.1.3-remove-setuptools_git.patch b/dev-python/pymssql/files/pymssql-2.1.3-remove-setuptools_git.patch new file mode 100644 index 000000000000..1a35cc064f78 --- /dev/null +++ b/dev-python/pymssql/files/pymssql-2.1.3-remove-setuptools_git.patch @@ -0,0 +1,10 @@ +--- a/setup.py ++++ b/setup.py +@@ -472,7 +472,6 @@ setup( + "Operating System :: Unix", + ], + zip_safe = False, +- setup_requires=['setuptools_git'], + tests_require=['pytest', 'unittest2'], + ext_modules = ext_modules(), + diff --git a/dev-python/pymssql/pymssql-2.1.3.ebuild b/dev-python/pymssql/pymssql-2.1.3.ebuild new file mode 100644 index 000000000000..2f0c0f3a690d --- /dev/null +++ b/dev-python/pymssql/pymssql-2.1.3.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) + +inherit distutils-r1 + +DESCRIPTION="Simple MSSQL python extension module" +HOMEPAGE="http://www.pymssql.org/ https://pypi.python.org/pypi/pymssql" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="test" + +# tests need a running instance of freetds +RESTRICT="test" + +RDEPEND=">=dev-db/freetds-0.63[mssql]" +DEPEND=" + ${RDEPEND} + dev-python/cython[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/unittest2[${PYTHON_USEDEP}] + )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.1.3-DBVERSION_80.patch + "${FILESDIR}"/${PN}-2.1.3-remove-setuptools_git.patch +) + +python_prepare_all() { + # delete stale cython .c file + # this can cause issues with the patches + rm {_mssql,pymssql}.c || die + + distutils-r1_python_prepare_all +} + +python_test() { + py.test -v || die "Tests fail with ${EPYTHON}" +} |