Gentoo Archives: gentoo-commits

From: "Alexys Jacob (ultrabug)" <ultrabug@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/pymongo: pymongo-2.5.2.ebuild ChangeLog pymongo-2.5.ebuild pymongo-2.3.ebuild pymongo-2.5.1.ebuild
Date: Sun, 02 Jun 2013 16:21:41
Message-Id: 20130602162136.179872171D@flycatcher.gentoo.org
1 ultrabug 13/06/02 16:21:36
2
3 Modified: ChangeLog
4 Added: pymongo-2.5.2.ebuild
5 Removed: pymongo-2.5.ebuild pymongo-2.3.ebuild
6 pymongo-2.5.1.ebuild
7 Log:
8 fix #472046 wrt #472034, drop old
9
10 (Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key B658FA13)
11
12 Revision Changes Path
13 1.27 dev-python/pymongo/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pymongo/ChangeLog?rev=1.27&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pymongo/ChangeLog?rev=1.27&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pymongo/ChangeLog?r1=1.26&r2=1.27
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/dev-python/pymongo/ChangeLog,v
22 retrieving revision 1.26
23 retrieving revision 1.27
24 diff -u -r1.26 -r1.27
25 --- ChangeLog 28 May 2013 18:24:32 -0000 1.26
26 +++ ChangeLog 2 Jun 2013 16:21:35 -0000 1.27
27 @@ -1,6 +1,12 @@
28 # ChangeLog for dev-python/pymongo
29 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pymongo/ChangeLog,v 1.26 2013/05/28 18:24:32 idella4 Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pymongo/ChangeLog,v 1.27 2013/06/02 16:21:35 ultrabug Exp $
32 +
33 +*pymongo-2.5.2 (02 Jun 2013)
34 +
35 + 02 Jun 2013; Ultrabug <ultrabug@g.o> -pymongo-2.3.ebuild,
36 + -pymongo-2.5.ebuild, -pymongo-2.5.1.ebuild, +pymongo-2.5.2.ebuild:
37 + fix #472046 wrt #472034, drop old
38
39 28 May 2013; Ian Delaney <idella4@g.o>
40 +files/pymongo-2.5.1-greenlet.patch, pymongo-2.5.1.ebuild, pymongo-2.5.ebuild:
41
42
43
44 1.1 dev-python/pymongo/pymongo-2.5.2.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pymongo/pymongo-2.5.2.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pymongo/pymongo-2.5.2.ebuild?rev=1.1&content-type=text/plain
48
49 Index: pymongo-2.5.2.ebuild
50 ===================================================================
51 # Copyright 1999-2013 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/dev-python/pymongo/pymongo-2.5.2.ebuild,v 1.1 2013/06/02 16:21:35 ultrabug Exp $
54
55 EAPI=5
56
57 PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} pypy{1_9,2_0} )
58
59 inherit check-reqs distutils-r1
60
61 DESCRIPTION="Python driver for MongoDB"
62 HOMEPAGE="http://github.com/mongodb/mongo-python-driver http://pypi.python.org/pypi/pymongo"
63 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
64
65 LICENSE="Apache-2.0"
66 SLOT="0"
67 KEYWORDS="~amd64 ~x86"
68 IUSE="doc kerberos mod_wsgi test"
69
70 RDEPEND="dev-db/mongodb"
71 DEPEND="${RDEPEND}
72 dev-python/setuptools[${PYTHON_USEDEP}]
73 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
74 test? ( dev-python/nose[${PYTHON_USEDEP}] )
75 kerberos? ( dev-python/pykerberos )"
76 DISTUTILS_IN_SOURCE_BUILD=1
77
78 reqcheck() {
79 if use test; then
80 # During the tests, database size reaches 1.5G.
81 local CHECKREQS_DISK_BUILD=1536M
82
83 check-reqs_${1}
84 fi
85 }
86
87 pkg_pretend() {
88 reqcheck pkg_pretend
89 }
90
91 pkg_setup() {
92 reqcheck pkg_setup
93 }
94
95 PATCHES=( "${FILESDIR}"/${PN}-2.5.1-greenlet.patch )
96
97 python_compile_all() {
98 if use doc; then
99 mkdir html || die
100 sphinx-build doc html || die
101 fi
102 }
103
104 src_test() {
105 # Yes, we need TCP/IP for that...
106 local DB_IP=127.0.0.1
107 local DB_PORT=27000
108
109 export DB_IP DB_PORT
110
111 # 1.5G of disk space per run.
112 local DISTUTILS_NO_PARALLEL_BUILD=1
113
114 distutils-r1_src_test
115 }
116
117 python_test() {
118 local dbpath=${TMPDIR}/mongo.db
119 local logpath=${TMPDIR}/mongod.log
120
121 # Now, the hard part: we need to find a free port for mongod.
122 # We're just trying to run it random port numbers and check the log
123 # for bind errors. It shall be noted that 'mongod --fork' does not
124 # return failure when it fails to bind.
125
126 mkdir -p "${dbpath}" || die
127 while true; do
128 ebegin "Trying to start mongod on port ${DB_PORT}"
129
130 LC_ALL=C \
131 mongod --dbpath "${dbpath}" --smallfiles --nojournal \
132 --bind_ip ${DB_IP} --port ${DB_PORT} \
133 --unixSocketPrefix "${TMPDIR}" \
134 --logpath "${logpath}" --fork \
135 && sleep 2
136
137 # Now we need to check if the server actually started...
138 if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then
139 # yay!
140 eend 0
141 break
142 elif grep -q 'Address already in use' "${logpath}"; then
143 # ay, someone took our port!
144 eend 1
145 : $(( DB_PORT += 1 ))
146 continue
147 else
148 eend 1
149 eerror "Unable to start mongod for tests. See the server log:"
150 eerror " ${logpath}"
151 die "Unable to start mongod for tests."
152 fi
153 done
154
155 local failed
156 #https://jira.mongodb.org/browse/PYTHON-521, py2.[6-7] has intermittent failure with gevent
157 pushd "${BUILD_DIR}"/../ > /dev/null
158 if [[ "${EPYTHON}" == python3* ]]; then
159 2to3 --no-diffs -w test
160 fi
161 DB_PORT2=$(( DB_PORT + 1 )) DB_PORT3=$(( DB_PORT + 2 )) esetup.py test || failed=1
162
163 mongod --dbpath "${dbpath}" --shutdown
164
165 [[ ${failed} ]] && die "Tests fail with ${EPYTHON}"
166
167 rm -rf "${dbpath}"
168 }
169
170 python_install() {
171 # Maintainer note:
172 # In order to work with mod_wsgi, we need to disable the C extension.
173 # See [1] for more information.
174 # [1] http://api.mongodb.org/python/current/faq.html#does-pymongo-work-with-mod-wsgi
175 distutils-r1_python_install $(use mod_wsgi && echo --no_ext)
176 }
177
178 python_install_all() {
179 use doc && local HTML_DOCS=( html/. )
180
181 distutils-r1_python_install_all
182 }