1 |
commit: 0ab6d92217426fc74515830bbf61c12b8741d996 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 28 17:50:29 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 28 18:02:35 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ab6d922 |
7 |
|
8 |
dev-python/pymongo: Remove redundant versions |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pymongo/Manifest | 4 -- |
13 |
dev-python/pymongo/pymongo-3.4.0.ebuild | 121 -------------------------------- |
14 |
dev-python/pymongo/pymongo-3.5.1.ebuild | 121 -------------------------------- |
15 |
dev-python/pymongo/pymongo-3.7.1.ebuild | 121 -------------------------------- |
16 |
dev-python/pymongo/pymongo-3.7.2.ebuild | 120 ------------------------------- |
17 |
5 files changed, 487 deletions(-) |
18 |
|
19 |
diff --git a/dev-python/pymongo/Manifest b/dev-python/pymongo/Manifest |
20 |
index 4964ec1ecd1..da11990270a 100644 |
21 |
--- a/dev-python/pymongo/Manifest |
22 |
+++ b/dev-python/pymongo/Manifest |
23 |
@@ -1,6 +1,2 @@ |
24 |
DIST pymongo-3.10.1.tar.gz 715892 BLAKE2B df1f8ae34366ea9de633be7e1ca103a2bc704a18a9b23cb1fbdbc8d116e939d4d5462e18a076149d93dcb8ada9f4737ed2d61b08803b546dce89dca4b2416689 SHA512 5a73ac17ef6f6783a573facd90879dbefa0c95d69123bc67c1a6af0987cb5786f637b8fa81a6810387acc34829a4cde33b848ac0f7b08f7d07faa90a8e13b595 |
25 |
-DIST pymongo-3.4.0.tar.gz 583303 BLAKE2B 2031b52731db8c5def167b2aceb4e1d064f0ff2391f71d2507cfc03ab932b4e1150d61a7b039b6183f5aa305e5e562110709a858174f37f0523d44d50d7c642c SHA512 c59dcc08803f23134aa4a86605fab0f5c59b829325b632fc1e0149f20018a544b3d65f3c1fda6066248cd258715339b1771ca8d40c38be02c301f5b6421abd1b |
26 |
-DIST pymongo-3.5.1.tar.gz 1332463 BLAKE2B d581409a4b6cdede3e126e31747d34ed0e238919163ed442477ae51765ebdd1ebfb53fc94f7f1f53161c2019bf9db46640730aa54f19af6af25a37c95372308d SHA512 67526bcc27233b85226d7ef6aacce6dfb848efc88730fb8207c3b610f3943ac813f6c2842b7e514d733a65a2b7ea4f255574732e42372551b1b333e3437fd82f |
27 |
-DIST pymongo-3.7.1.tar.gz 723014 BLAKE2B fd0be64f01006405f30e8d96e5edc0d565a8b67ec057a27b6143b4dd0592e2302efea65b6e3d4898d12e196b1efe01787aa608d8564573a83bfd193c703ba0c4 SHA512 34f7448c90a0741d1c80e5924d53e70d5c4bf74d140ea50cef1a519e11b7429dc8551ddb868ec4c02351da6619924ae0d4f7bfc12ef4fa9635c81e2f69aea30f |
28 |
-DIST pymongo-3.7.2.tar.gz 628611 BLAKE2B 4eac5f11c8cd9a1bf8e0553a1fc3ec8f0a4bec0fd6b04dd75fe85da7315baa0e81a3c2b2aa4eba351aa4206aae974bce263f0630ac8828d8a982c4902cf7f518 SHA512 4d1dfe03d94f381f27cfb5c8dd4f75ecbab90567fdc4dd594b880031e68825eda6285c8b261a4c9d76fb7ccc92c91e27ae2f696525f7732b1f0084794042a33d |
29 |
DIST pymongo-3.9.0.tar.gz 701117 BLAKE2B c13b53f06fa1788f65de46b6a05474355e312a1cdd7798610b300c1a7bb9964d32243da52a4dad61d5b50e736c717f5549f61b28c06e1024505bdd3ec04ab99a SHA512 3ac8831ffd82c27bfbf8429a38fe26aed177ba68b89d0ddf043adfde326b8c01eea9be449bb985421f42677fab4dd5ab44e1c1c9eeb3aff41d792c660fe23e0b |
30 |
|
31 |
diff --git a/dev-python/pymongo/pymongo-3.4.0.ebuild b/dev-python/pymongo/pymongo-3.4.0.ebuild |
32 |
deleted file mode 100644 |
33 |
index 370d58e2bb4..00000000000 |
34 |
--- a/dev-python/pymongo/pymongo-3.4.0.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,121 +0,0 @@ |
37 |
-# Copyright 1999-2020 Gentoo Authors |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-EAPI=6 |
41 |
- |
42 |
-PYTHON_COMPAT=( python2_7 python3_6 ) |
43 |
- |
44 |
-inherit check-reqs distutils-r1 |
45 |
- |
46 |
-DESCRIPTION="Python driver for MongoDB" |
47 |
-HOMEPAGE="https://github.com/mongodb/mongo-python-driver https://pypi.org/project/pymongo/" |
48 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
49 |
- |
50 |
-LICENSE="Apache-2.0" |
51 |
-SLOT="0" |
52 |
-KEYWORDS="amd64 ~hppa x86" |
53 |
-IUSE="doc kerberos test" |
54 |
-RESTRICT="!test? ( test )" |
55 |
- |
56 |
-RDEPEND=" |
57 |
- kerberos? ( dev-python/pykerberos[${PYTHON_USEDEP}] ) |
58 |
-" |
59 |
-DEPEND=" |
60 |
- ${RDEPEND} |
61 |
- dev-python/setuptools[${PYTHON_USEDEP}] |
62 |
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
63 |
- test? ( |
64 |
- dev-python/nose[${PYTHON_USEDEP}] |
65 |
- >=dev-db/mongodb-2.6.0 |
66 |
- ) |
67 |
-" |
68 |
-DISTUTILS_IN_SOURCE_BUILD=1 |
69 |
- |
70 |
-reqcheck() { |
71 |
- if use test; then |
72 |
- # During the tests, database size reaches 1.5G. |
73 |
- local CHECKREQS_DISK_BUILD=1536M |
74 |
- |
75 |
- check-reqs_${1} |
76 |
- fi |
77 |
-} |
78 |
- |
79 |
-pkg_pretend() { |
80 |
- reqcheck pkg_pretend |
81 |
-} |
82 |
- |
83 |
-pkg_setup() { |
84 |
- reqcheck pkg_setup |
85 |
-} |
86 |
- |
87 |
-python_compile_all() { |
88 |
- if use doc; then |
89 |
- mkdir html || die |
90 |
- sphinx-build doc html || die |
91 |
- fi |
92 |
-} |
93 |
- |
94 |
-python_test() { |
95 |
- # Yes, we need TCP/IP for that... |
96 |
- local DB_IP=127.0.0.1 |
97 |
- local DB_PORT=27000 |
98 |
- |
99 |
- export DB_IP DB_PORT |
100 |
- |
101 |
- local dbpath=${TMPDIR}/mongo.db |
102 |
- local logpath=${TMPDIR}/mongod.log |
103 |
- |
104 |
- # Now, the hard part: we need to find a free port for mongod. |
105 |
- # We're just trying to run it random port numbers and check the log |
106 |
- # for bind errors. It shall be noted that 'mongod --fork' does not |
107 |
- # return failure when it fails to bind. |
108 |
- |
109 |
- mkdir -p "${dbpath}" || die |
110 |
- while true; do |
111 |
- ebegin "Trying to start mongod on port ${DB_PORT}" |
112 |
- |
113 |
- LC_ALL=C \ |
114 |
- mongod --dbpath "${dbpath}" --smallfiles --nojournal \ |
115 |
- --bind_ip ${DB_IP} --port ${DB_PORT} \ |
116 |
- --unixSocketPrefix "${TMPDIR}" \ |
117 |
- --logpath "${logpath}" --fork \ |
118 |
- && sleep 2 |
119 |
- |
120 |
- # Now we need to check if the server actually started... |
121 |
- if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then |
122 |
- # yay! |
123 |
- eend 0 |
124 |
- break |
125 |
- elif grep -q 'Address already in use' "${logpath}"; then |
126 |
- # ay, someone took our port! |
127 |
- eend 1 |
128 |
- : $(( DB_PORT += 1 )) |
129 |
- continue |
130 |
- else |
131 |
- eend 1 |
132 |
- eerror "Unable to start mongod for tests. See the server log:" |
133 |
- eerror " ${logpath}" |
134 |
- die "Unable to start mongod for tests." |
135 |
- fi |
136 |
- done |
137 |
- |
138 |
- local failed |
139 |
- #https://jira.mongodb.org/browse/PYTHON-521, py2.[6-7] has intermittent failure with gevent |
140 |
- pushd "${BUILD_DIR}"/../ > /dev/null |
141 |
- if [[ "${EPYTHON}" == python3* ]]; then |
142 |
- 2to3 --no-diffs -w test |
143 |
- fi |
144 |
- DB_PORT2=$(( DB_PORT + 1 )) DB_PORT3=$(( DB_PORT + 2 )) esetup.py test || failed=1 |
145 |
- |
146 |
- mongod --dbpath "${dbpath}" --shutdown || die |
147 |
- |
148 |
- [[ ${failed} ]] && die "Tests fail with ${EPYTHON}" |
149 |
- |
150 |
- rm -rf "${dbpath}" || die |
151 |
-} |
152 |
- |
153 |
-python_install_all() { |
154 |
- use doc && local HTML_DOCS=( html/. ) |
155 |
- |
156 |
- distutils-r1_python_install_all |
157 |
-} |
158 |
|
159 |
diff --git a/dev-python/pymongo/pymongo-3.5.1.ebuild b/dev-python/pymongo/pymongo-3.5.1.ebuild |
160 |
deleted file mode 100644 |
161 |
index 9d451611d6c..00000000000 |
162 |
--- a/dev-python/pymongo/pymongo-3.5.1.ebuild |
163 |
+++ /dev/null |
164 |
@@ -1,121 +0,0 @@ |
165 |
-# Copyright 1999-2020 Gentoo Authors |
166 |
-# Distributed under the terms of the GNU General Public License v2 |
167 |
- |
168 |
-EAPI=6 |
169 |
- |
170 |
-PYTHON_COMPAT=( python2_7 python3_6 ) |
171 |
- |
172 |
-inherit check-reqs distutils-r1 |
173 |
- |
174 |
-DESCRIPTION="Python driver for MongoDB" |
175 |
-HOMEPAGE="https://github.com/mongodb/mongo-python-driver https://pypi.org/project/pymongo/" |
176 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
177 |
- |
178 |
-LICENSE="Apache-2.0" |
179 |
-SLOT="0" |
180 |
-KEYWORDS="amd64 ~arm64 ~hppa x86" |
181 |
-IUSE="doc kerberos test" |
182 |
-RESTRICT="!test? ( test )" |
183 |
- |
184 |
-RDEPEND=" |
185 |
- kerberos? ( dev-python/pykerberos[${PYTHON_USEDEP}] ) |
186 |
-" |
187 |
-DEPEND=" |
188 |
- ${RDEPEND} |
189 |
- dev-python/setuptools[${PYTHON_USEDEP}] |
190 |
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
191 |
- test? ( |
192 |
- dev-python/nose[${PYTHON_USEDEP}] |
193 |
- >=dev-db/mongodb-2.6.0 |
194 |
- ) |
195 |
-" |
196 |
-DISTUTILS_IN_SOURCE_BUILD=1 |
197 |
- |
198 |
-reqcheck() { |
199 |
- if use test; then |
200 |
- # During the tests, database size reaches 1.5G. |
201 |
- local CHECKREQS_DISK_BUILD=1536M |
202 |
- |
203 |
- check-reqs_${1} |
204 |
- fi |
205 |
-} |
206 |
- |
207 |
-pkg_pretend() { |
208 |
- reqcheck pkg_pretend |
209 |
-} |
210 |
- |
211 |
-pkg_setup() { |
212 |
- reqcheck pkg_setup |
213 |
-} |
214 |
- |
215 |
-python_compile_all() { |
216 |
- if use doc; then |
217 |
- mkdir html || die |
218 |
- sphinx-build doc html || die |
219 |
- fi |
220 |
-} |
221 |
- |
222 |
-python_test() { |
223 |
- # Yes, we need TCP/IP for that... |
224 |
- local DB_IP=127.0.0.1 |
225 |
- local DB_PORT=27000 |
226 |
- |
227 |
- export DB_IP DB_PORT |
228 |
- |
229 |
- local dbpath=${TMPDIR}/mongo.db |
230 |
- local logpath=${TMPDIR}/mongod.log |
231 |
- |
232 |
- # Now, the hard part: we need to find a free port for mongod. |
233 |
- # We're just trying to run it random port numbers and check the log |
234 |
- # for bind errors. It shall be noted that 'mongod --fork' does not |
235 |
- # return failure when it fails to bind. |
236 |
- |
237 |
- mkdir -p "${dbpath}" || die |
238 |
- while true; do |
239 |
- ebegin "Trying to start mongod on port ${DB_PORT}" |
240 |
- |
241 |
- LC_ALL=C \ |
242 |
- mongod --dbpath "${dbpath}" --smallfiles --nojournal \ |
243 |
- --bind_ip ${DB_IP} --port ${DB_PORT} \ |
244 |
- --unixSocketPrefix "${TMPDIR}" \ |
245 |
- --logpath "${logpath}" --fork \ |
246 |
- && sleep 2 |
247 |
- |
248 |
- # Now we need to check if the server actually started... |
249 |
- if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then |
250 |
- # yay! |
251 |
- eend 0 |
252 |
- break |
253 |
- elif grep -q 'Address already in use' "${logpath}"; then |
254 |
- # ay, someone took our port! |
255 |
- eend 1 |
256 |
- : $(( DB_PORT += 1 )) |
257 |
- continue |
258 |
- else |
259 |
- eend 1 |
260 |
- eerror "Unable to start mongod for tests. See the server log:" |
261 |
- eerror " ${logpath}" |
262 |
- die "Unable to start mongod for tests." |
263 |
- fi |
264 |
- done |
265 |
- |
266 |
- local failed |
267 |
- #https://jira.mongodb.org/browse/PYTHON-521, py2.[6-7] has intermittent failure with gevent |
268 |
- pushd "${BUILD_DIR}"/../ > /dev/null |
269 |
- if [[ "${EPYTHON}" == python3* ]]; then |
270 |
- 2to3 --no-diffs -w test |
271 |
- fi |
272 |
- DB_PORT2=$(( DB_PORT + 1 )) DB_PORT3=$(( DB_PORT + 2 )) esetup.py test || failed=1 |
273 |
- |
274 |
- mongod --dbpath "${dbpath}" --shutdown || die |
275 |
- |
276 |
- [[ ${failed} ]] && die "Tests fail with ${EPYTHON}" |
277 |
- |
278 |
- rm -rf "${dbpath}" || die |
279 |
-} |
280 |
- |
281 |
-python_install_all() { |
282 |
- use doc && local HTML_DOCS=( html/. ) |
283 |
- |
284 |
- distutils-r1_python_install_all |
285 |
-} |
286 |
|
287 |
diff --git a/dev-python/pymongo/pymongo-3.7.1.ebuild b/dev-python/pymongo/pymongo-3.7.1.ebuild |
288 |
deleted file mode 100644 |
289 |
index 15d6079ea08..00000000000 |
290 |
--- a/dev-python/pymongo/pymongo-3.7.1.ebuild |
291 |
+++ /dev/null |
292 |
@@ -1,121 +0,0 @@ |
293 |
-# Copyright 1999-2020 Gentoo Authors |
294 |
-# Distributed under the terms of the GNU General Public License v2 |
295 |
- |
296 |
-EAPI=6 |
297 |
- |
298 |
-PYTHON_COMPAT=( python2_7 python3_6 ) |
299 |
- |
300 |
-inherit check-reqs distutils-r1 |
301 |
- |
302 |
-DESCRIPTION="Python driver for MongoDB" |
303 |
-HOMEPAGE="https://github.com/mongodb/mongo-python-driver https://pypi.org/project/pymongo/" |
304 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
305 |
- |
306 |
-LICENSE="Apache-2.0" |
307 |
-SLOT="0" |
308 |
-KEYWORDS="~amd64 ~arm64 ~hppa ~x86" |
309 |
-IUSE="doc kerberos test" |
310 |
-RESTRICT="!test? ( test )" |
311 |
- |
312 |
-RDEPEND=" |
313 |
- kerberos? ( dev-python/pykerberos[${PYTHON_USEDEP}] ) |
314 |
-" |
315 |
-DEPEND=" |
316 |
- ${RDEPEND} |
317 |
- dev-python/setuptools[${PYTHON_USEDEP}] |
318 |
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
319 |
- test? ( |
320 |
- dev-python/nose[${PYTHON_USEDEP}] |
321 |
- >=dev-db/mongodb-2.6.0 |
322 |
- ) |
323 |
-" |
324 |
-DISTUTILS_IN_SOURCE_BUILD=1 |
325 |
- |
326 |
-reqcheck() { |
327 |
- if use test; then |
328 |
- # During the tests, database size reaches 1.5G. |
329 |
- local CHECKREQS_DISK_BUILD=1536M |
330 |
- |
331 |
- check-reqs_${1} |
332 |
- fi |
333 |
-} |
334 |
- |
335 |
-pkg_pretend() { |
336 |
- reqcheck pkg_pretend |
337 |
-} |
338 |
- |
339 |
-pkg_setup() { |
340 |
- reqcheck pkg_setup |
341 |
-} |
342 |
- |
343 |
-python_compile_all() { |
344 |
- if use doc; then |
345 |
- mkdir html || die |
346 |
- sphinx-build doc html || die |
347 |
- fi |
348 |
-} |
349 |
- |
350 |
-python_test() { |
351 |
- # Yes, we need TCP/IP for that... |
352 |
- local DB_IP=127.0.0.1 |
353 |
- local DB_PORT=27000 |
354 |
- |
355 |
- export DB_IP DB_PORT |
356 |
- |
357 |
- local dbpath=${TMPDIR}/mongo.db |
358 |
- local logpath=${TMPDIR}/mongod.log |
359 |
- |
360 |
- # Now, the hard part: we need to find a free port for mongod. |
361 |
- # We're just trying to run it random port numbers and check the log |
362 |
- # for bind errors. It shall be noted that 'mongod --fork' does not |
363 |
- # return failure when it fails to bind. |
364 |
- |
365 |
- mkdir -p "${dbpath}" || die |
366 |
- while true; do |
367 |
- ebegin "Trying to start mongod on port ${DB_PORT}" |
368 |
- |
369 |
- LC_ALL=C \ |
370 |
- mongod --dbpath "${dbpath}" --smallfiles --nojournal \ |
371 |
- --bind_ip ${DB_IP} --port ${DB_PORT} \ |
372 |
- --unixSocketPrefix "${TMPDIR}" \ |
373 |
- --logpath "${logpath}" --fork \ |
374 |
- && sleep 2 |
375 |
- |
376 |
- # Now we need to check if the server actually started... |
377 |
- if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then |
378 |
- # yay! |
379 |
- eend 0 |
380 |
- break |
381 |
- elif grep -q 'Address already in use' "${logpath}"; then |
382 |
- # ay, someone took our port! |
383 |
- eend 1 |
384 |
- : $(( DB_PORT += 1 )) |
385 |
- continue |
386 |
- else |
387 |
- eend 1 |
388 |
- eerror "Unable to start mongod for tests. See the server log:" |
389 |
- eerror " ${logpath}" |
390 |
- die "Unable to start mongod for tests." |
391 |
- fi |
392 |
- done |
393 |
- |
394 |
- local failed |
395 |
- #https://jira.mongodb.org/browse/PYTHON-521, py2.[6-7] has intermittent failure with gevent |
396 |
- pushd "${BUILD_DIR}"/../ > /dev/null |
397 |
- if [[ "${EPYTHON}" == python3* ]]; then |
398 |
- 2to3 --no-diffs -w test |
399 |
- fi |
400 |
- DB_PORT2=$(( DB_PORT + 1 )) DB_PORT3=$(( DB_PORT + 2 )) esetup.py test || failed=1 |
401 |
- |
402 |
- mongod --dbpath "${dbpath}" --shutdown || die |
403 |
- |
404 |
- [[ ${failed} ]] && die "Tests fail with ${EPYTHON}" |
405 |
- |
406 |
- rm -rf "${dbpath}" || die |
407 |
-} |
408 |
- |
409 |
-python_install_all() { |
410 |
- use doc && local HTML_DOCS=( html/. ) |
411 |
- |
412 |
- distutils-r1_python_install_all |
413 |
-} |
414 |
|
415 |
diff --git a/dev-python/pymongo/pymongo-3.7.2.ebuild b/dev-python/pymongo/pymongo-3.7.2.ebuild |
416 |
deleted file mode 100644 |
417 |
index b3549a7429a..00000000000 |
418 |
--- a/dev-python/pymongo/pymongo-3.7.2.ebuild |
419 |
+++ /dev/null |
420 |
@@ -1,120 +0,0 @@ |
421 |
-# Copyright 1999-2020 Gentoo Authors |
422 |
-# Distributed under the terms of the GNU General Public License v2 |
423 |
- |
424 |
-EAPI=7 |
425 |
-PYTHON_COMPAT=( python2_7 python3_{6,7} ) |
426 |
- |
427 |
-inherit check-reqs distutils-r1 |
428 |
- |
429 |
-DESCRIPTION="Python driver for MongoDB" |
430 |
-HOMEPAGE="https://github.com/mongodb/mongo-python-driver https://pypi.org/project/pymongo/" |
431 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
432 |
- |
433 |
-LICENSE="Apache-2.0" |
434 |
-SLOT="0" |
435 |
-KEYWORDS="~amd64 ~arm64 ~hppa ~x86" |
436 |
-IUSE="doc kerberos test" |
437 |
-RESTRICT="!test? ( test )" |
438 |
- |
439 |
-RDEPEND=" |
440 |
- kerberos? ( dev-python/pykerberos[${PYTHON_USEDEP}] ) |
441 |
-" |
442 |
-DEPEND=" |
443 |
- ${RDEPEND} |
444 |
- dev-python/setuptools[${PYTHON_USEDEP}] |
445 |
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
446 |
- test? ( |
447 |
- dev-python/nose[${PYTHON_USEDEP}] |
448 |
- >=dev-db/mongodb-2.6.0 |
449 |
- ) |
450 |
-" |
451 |
-DISTUTILS_IN_SOURCE_BUILD=1 |
452 |
- |
453 |
-reqcheck() { |
454 |
- if use test; then |
455 |
- # During the tests, database size reaches 1.5G. |
456 |
- local CHECKREQS_DISK_BUILD=1536M |
457 |
- |
458 |
- check-reqs_${1} |
459 |
- fi |
460 |
-} |
461 |
- |
462 |
-pkg_pretend() { |
463 |
- reqcheck pkg_pretend |
464 |
-} |
465 |
- |
466 |
-pkg_setup() { |
467 |
- reqcheck pkg_setup |
468 |
-} |
469 |
- |
470 |
-python_compile_all() { |
471 |
- if use doc; then |
472 |
- mkdir html || die |
473 |
- sphinx-build doc html || die |
474 |
- fi |
475 |
-} |
476 |
- |
477 |
-python_test() { |
478 |
- # Yes, we need TCP/IP for that... |
479 |
- local DB_IP=127.0.0.1 |
480 |
- local DB_PORT=27000 |
481 |
- |
482 |
- export DB_IP DB_PORT |
483 |
- |
484 |
- local dbpath=${TMPDIR}/mongo.db |
485 |
- local logpath=${TMPDIR}/mongod.log |
486 |
- |
487 |
- # Now, the hard part: we need to find a free port for mongod. |
488 |
- # We're just trying to run it random port numbers and check the log |
489 |
- # for bind errors. It shall be noted that 'mongod --fork' does not |
490 |
- # return failure when it fails to bind. |
491 |
- |
492 |
- mkdir -p "${dbpath}" || die |
493 |
- while true; do |
494 |
- ebegin "Trying to start mongod on port ${DB_PORT}" |
495 |
- |
496 |
- LC_ALL=C \ |
497 |
- mongod --dbpath "${dbpath}" --smallfiles --nojournal \ |
498 |
- --bind_ip ${DB_IP} --port ${DB_PORT} \ |
499 |
- --unixSocketPrefix "${TMPDIR}" \ |
500 |
- --logpath "${logpath}" --fork \ |
501 |
- && sleep 2 |
502 |
- |
503 |
- # Now we need to check if the server actually started... |
504 |
- if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then |
505 |
- # yay! |
506 |
- eend 0 |
507 |
- break |
508 |
- elif grep -q 'Address already in use' "${logpath}"; then |
509 |
- # ay, someone took our port! |
510 |
- eend 1 |
511 |
- : $(( DB_PORT += 1 )) |
512 |
- continue |
513 |
- else |
514 |
- eend 1 |
515 |
- eerror "Unable to start mongod for tests. See the server log:" |
516 |
- eerror " ${logpath}" |
517 |
- die "Unable to start mongod for tests." |
518 |
- fi |
519 |
- done |
520 |
- |
521 |
- local failed |
522 |
- #https://jira.mongodb.org/browse/PYTHON-521, py2.[6-7] has intermittent failure with gevent |
523 |
- pushd "${BUILD_DIR}"/../ > /dev/null |
524 |
- if [[ "${EPYTHON}" == python3* ]]; then |
525 |
- 2to3 --no-diffs -w test |
526 |
- fi |
527 |
- DB_PORT2=$(( DB_PORT + 1 )) DB_PORT3=$(( DB_PORT + 2 )) esetup.py test || failed=1 |
528 |
- |
529 |
- mongod --dbpath "${dbpath}" --shutdown || die |
530 |
- |
531 |
- [[ ${failed} ]] && die "Tests fail with ${EPYTHON}" |
532 |
- |
533 |
- rm -rf "${dbpath}" || die |
534 |
-} |
535 |
- |
536 |
-python_install_all() { |
537 |
- use doc && local HTML_DOCS=( html/. ) |
538 |
- |
539 |
- distutils-r1_python_install_all |
540 |
-} |