Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pymssql/, dev-python/pymssql/files/
Date: Sun, 05 Aug 2018 19:59:11
Message-Id: 1533499127.484ba6edf25368869c80e9c8e339784a7789f368.soap@gentoo
1 commit: 484ba6edf25368869c80e9c8e339784a7789f368
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 5 19:57:36 2018 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 5 19:58:47 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=484ba6ed
7
8 dev-python/pymssql: Version bump to 2.1.3
9
10 Closes: https://bugs.gentoo.org/541360
11 Package-Manager: Portage-2.3.44, Repoman-2.3.10
12
13 dev-python/pymssql/Manifest | 1 +
14 .../pymssql/files/pymssql-2.1.3-DBVERSION_80.patch | 13 ++++++
15 .../pymssql-2.1.3-remove-setuptools_git.patch | 10 +++++
16 dev-python/pymssql/pymssql-2.1.3.ebuild | 47 ++++++++++++++++++++++
17 4 files changed, 71 insertions(+)
18
19 diff --git a/dev-python/pymssql/Manifest b/dev-python/pymssql/Manifest
20 index 97366816ff2..37a497570e6 100644
21 --- a/dev-python/pymssql/Manifest
22 +++ b/dev-python/pymssql/Manifest
23 @@ -1 +1,2 @@
24 DIST pymssql-1.0.2.tar.gz 175469 BLAKE2B a88c04be044478c2bec76a15e05ff751b961d253ca2e071ee8293c0899e091f96206a87486333f2543de609c7b38ff9e8a1a4ba7686625489bb9ed5c56e3cf19 SHA512 6e9a2d26f2cc33bac093f2a2a41771aa41ba336413076c793137558c05e48cea7409f74f35530939b36a708cc47c66ec0dc765a768bd5f857642553568fe859e
25 +DIST pymssql-2.1.3.tar.gz 897987 BLAKE2B e105dd8d5dbbad5de566b9179f799ad66eb420f60464e8061470b1abb6ecf38f35ad7992ded40f2cd62c76a8e04255eb647e30df5c9bc4059334a1d5d4677e73 SHA512 a659cb8f077ddbe5e8de0b9b118d8bcc0c87128c0be4ff14343983e7029594e63ba6fb8a88992dc1f058df3c1ebbbd69cf371bf95a0918954cd0cec14c1cb5cb
26
27 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
28 new file mode 100644
29 index 00000000000..9d72a981735
30 --- /dev/null
31 +++ b/dev-python/pymssql/files/pymssql-2.1.3-DBVERSION_80.patch
32 @@ -0,0 +1,13 @@
33 +--- a/_mssql.pyx
34 ++++ b/_mssql.pyx
35 +@@ -34,6 +34,10 @@ DEF EXCOMM = 9
36 + # Provide constants missing in FreeTDS 0.82 so that we can build against it
37 + DEF DBVERSION_71 = 5
38 + DEF DBVERSION_72 = 6
39 ++# See /usr/include/sybdb.h - DBVERSION_80 is not defined in FreeTDS 1.00.13
40 ++# (cf. http://www.freetds.org/userguide/choosingtdsprotocol.htm)
41 ++# 8.0 was actually 7.1 so set it to the same value
42 ++DEF DBVERSION_80 = 5
43 +
44 + ROW_FORMAT_TUPLE = 1
45 + ROW_FORMAT_DICT = 2
46
47 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
48 new file mode 100644
49 index 00000000000..1a35cc064f7
50 --- /dev/null
51 +++ b/dev-python/pymssql/files/pymssql-2.1.3-remove-setuptools_git.patch
52 @@ -0,0 +1,10 @@
53 +--- a/setup.py
54 ++++ b/setup.py
55 +@@ -472,7 +472,6 @@ setup(
56 + "Operating System :: Unix",
57 + ],
58 + zip_safe = False,
59 +- setup_requires=['setuptools_git'],
60 + tests_require=['pytest', 'unittest2'],
61 + ext_modules = ext_modules(),
62 +
63
64 diff --git a/dev-python/pymssql/pymssql-2.1.3.ebuild b/dev-python/pymssql/pymssql-2.1.3.ebuild
65 new file mode 100644
66 index 00000000000..2f0c0f3a690
67 --- /dev/null
68 +++ b/dev-python/pymssql/pymssql-2.1.3.ebuild
69 @@ -0,0 +1,47 @@
70 +# Copyright 1999-2018 Gentoo Foundation
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=7
74 +
75 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
76 +
77 +inherit distutils-r1
78 +
79 +DESCRIPTION="Simple MSSQL python extension module"
80 +HOMEPAGE="http://www.pymssql.org/ https://pypi.python.org/pypi/pymssql"
81 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
82 +
83 +LICENSE="LGPL-2.1"
84 +SLOT="0"
85 +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
86 +IUSE="test"
87 +
88 +# tests need a running instance of freetds
89 +RESTRICT="test"
90 +
91 +RDEPEND=">=dev-db/freetds-0.63[mssql]"
92 +DEPEND="
93 + ${RDEPEND}
94 + dev-python/cython[${PYTHON_USEDEP}]
95 + dev-python/setuptools[${PYTHON_USEDEP}]
96 + test? (
97 + dev-python/pytest[${PYTHON_USEDEP}]
98 + dev-python/unittest2[${PYTHON_USEDEP}]
99 + )"
100 +
101 +PATCHES=(
102 + "${FILESDIR}"/${PN}-2.1.3-DBVERSION_80.patch
103 + "${FILESDIR}"/${PN}-2.1.3-remove-setuptools_git.patch
104 +)
105 +
106 +python_prepare_all() {
107 + # delete stale cython .c file
108 + # this can cause issues with the patches
109 + rm {_mssql,pymssql}.c || die
110 +
111 + distutils-r1_python_prepare_all
112 +}
113 +
114 +python_test() {
115 + py.test -v || die "Tests fail with ${EPYTHON}"
116 +}