Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pymongo/
Date: Tue, 03 Nov 2015 11:38:10
Message-Id: 1446550680.6a82312430626da9ffebc18298e84bde55afc267.jlec@gentoo
1 commit: 6a82312430626da9ffebc18298e84bde55afc267
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 3 10:42:07 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 3 11:38:00 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a823124
7
8 dev-python/pymongo: Version Bump
9
10 Package-Manager: portage-2.2.23
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 dev-python/pymongo/Manifest | 1 +
14 dev-python/pymongo/pymongo-3.1.ebuild | 121 ++++++++++++++++++++++++++++++++++
15 2 files changed, 122 insertions(+)
16
17 diff --git a/dev-python/pymongo/Manifest b/dev-python/pymongo/Manifest
18 index d15c924..92d8eca 100644
19 --- a/dev-python/pymongo/Manifest
20 +++ b/dev-python/pymongo/Manifest
21 @@ -3,3 +3,4 @@ DIST pymongo-2.7.2.tar.gz 381455 SHA256 8fb45e3edec006f4b11580fc579bec7781a8b320
22 DIST pymongo-2.8.1.tar.gz 399521 SHA256 300ea5762d059c07d1bb2578f35bd0e55bc31753951e2de3d6fe2ed54438e374 SHA512 8d02829eb8683572ffe8c1be5ee50a4c778e1a0b938820859be215b583e719d079183b1a26bc074fad7e31e8944756b82b146657ad528123514b59c725f6d7aa WHIRLPOOL b0c8c373771d3a4525ddf30db5903a6b1241aa1e160e688c215bef21395d598faa65f12e57ea8fe0f16d1c0eaa0abad02ebf3e0b9df2acb8e1c8e6ff9c20a214
23 DIST pymongo-2.9.tar.gz 430741 SHA256 90e994cfe5928841960dabdca709e75ab4d0f44b288fd59742113982d96290c4 SHA512 c12701797643b41503829b6c7e573cfff7d8c63c56d9eb195f1a67dc3204cd7ed2a28ee2bd2ce34d0c68bade3f44c8bd5c069b15082bf3388c3a401a35424b1e WHIRLPOOL 699a7f658734837f40fe4190251f8e8bb69dba80bbc6dba60207bb18d5dfb43ec5d1c6aca8810b45e7914705305416d0f76face88fd0c43aa20c6d0765eff01c
24 DIST pymongo-3.0.3.tar.gz 419692 SHA256 3c6b2317f8031bc1e200fd1ea35f00a96f4569e3f3f220a5e66ab6227d96ccaf SHA512 7a20fdcae5b3f852bded19c95b36ef6a8141bce0179440a2c5966cbb9f18f3985b7b6b4584c5253c34d0f846d809d72ec0ae076c88472a3de6f090466e9132b4 WHIRLPOOL ae610909b610c7d116dd3aa7c04ab9ce357b25208b07c025924c53bb36183a6d344ecff214def6a01b929dc50d698464c8dd33b6eafd2d88d6666d8534858a38
25 +DIST pymongo-3.1.tar.gz 462030 SHA256 fe7033007100f825a67640e77abdafee28713f255da88fcfc8d6abad0bb34285 SHA512 886cfbffd4514741e92ad1c79e97ee443d5c9874c823b64c3c2f2566e3005d588d7dd4ae813c320c94f3e6e12b1dd8c7ad56f0e6d2ee419f0d66f4c38321c9ab WHIRLPOOL ec39a42738b751875b92ca8501ccc1711f8e474efef8cf2817525dc47e420e03b7a581d9e35e4f94f529e07a7d81499f7d6e9402c085d9e47861c8a691d1e37e
26
27 diff --git a/dev-python/pymongo/pymongo-3.1.ebuild b/dev-python/pymongo/pymongo-3.1.ebuild
28 new file mode 100644
29 index 0000000..de75b07
30 --- /dev/null
31 +++ b/dev-python/pymongo/pymongo-3.1.ebuild
32 @@ -0,0 +1,121 @@
33 +# Copyright 1999-2015 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=5
38 +
39 +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
40 +
41 +inherit check-reqs distutils-r1
42 +
43 +DESCRIPTION="Python driver for MongoDB"
44 +HOMEPAGE="https://github.com/mongodb/mongo-python-driver https://pypi.python.org/pypi/pymongo"
45 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
46 +
47 +LICENSE="Apache-2.0"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~hppa ~x86"
50 +IUSE="doc kerberos test"
51 +
52 +RDEPEND="
53 + kerberos? ( dev-python/pykerberos[${PYTHON_USEDEP}] )
54 +"
55 +DEPEND="
56 + ${RDEPEND}
57 + dev-python/setuptools[${PYTHON_USEDEP}]
58 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
59 + test? (
60 + dev-python/nose[${PYTHON_USEDEP}]
61 + >=dev-db/mongodb-2.6.0
62 + )
63 +"
64 +DISTUTILS_IN_SOURCE_BUILD=1
65 +
66 +reqcheck() {
67 + if use test; then
68 + # During the tests, database size reaches 1.5G.
69 + local CHECKREQS_DISK_BUILD=1536M
70 +
71 + check-reqs_${1}
72 + fi
73 +}
74 +
75 +pkg_pretend() {
76 + reqcheck pkg_pretend
77 +}
78 +
79 +pkg_setup() {
80 + reqcheck pkg_setup
81 +}
82 +
83 +python_compile_all() {
84 + if use doc; then
85 + mkdir html || die
86 + sphinx-build doc html || die
87 + fi
88 +}
89 +
90 +python_test() {
91 + # Yes, we need TCP/IP for that...
92 + local DB_IP=127.0.0.1
93 + local DB_PORT=27000
94 +
95 + export DB_IP DB_PORT
96 +
97 + local dbpath=${TMPDIR}/mongo.db
98 + local logpath=${TMPDIR}/mongod.log
99 +
100 + # Now, the hard part: we need to find a free port for mongod.
101 + # We're just trying to run it random port numbers and check the log
102 + # for bind errors. It shall be noted that 'mongod --fork' does not
103 + # return failure when it fails to bind.
104 +
105 + mkdir -p "${dbpath}" || die
106 + while true; do
107 + ebegin "Trying to start mongod on port ${DB_PORT}"
108 +
109 + LC_ALL=C \
110 + mongod --dbpath "${dbpath}" --smallfiles --nojournal \
111 + --bind_ip ${DB_IP} --port ${DB_PORT} \
112 + --unixSocketPrefix "${TMPDIR}" \
113 + --logpath "${logpath}" --fork \
114 + && sleep 2
115 +
116 + # Now we need to check if the server actually started...
117 + if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then
118 + # yay!
119 + eend 0
120 + break
121 + elif grep -q 'Address already in use' "${logpath}"; then
122 + # ay, someone took our port!
123 + eend 1
124 + : $(( DB_PORT += 1 ))
125 + continue
126 + else
127 + eend 1
128 + eerror "Unable to start mongod for tests. See the server log:"
129 + eerror " ${logpath}"
130 + die "Unable to start mongod for tests."
131 + fi
132 + done
133 +
134 + local failed
135 + #https://jira.mongodb.org/browse/PYTHON-521, py2.[6-7] has intermittent failure with gevent
136 + pushd "${BUILD_DIR}"/../ > /dev/null
137 + if [[ "${EPYTHON}" == python3* ]]; then
138 + 2to3 --no-diffs -w test
139 + fi
140 + DB_PORT2=$(( DB_PORT + 1 )) DB_PORT3=$(( DB_PORT + 2 )) esetup.py test || failed=1
141 +
142 + mongod --dbpath "${dbpath}" --shutdown || die
143 +
144 + [[ ${failed} ]] && die "Tests fail with ${EPYTHON}"
145 +
146 + rm -rf "${dbpath}" || die
147 +}
148 +
149 +python_install_all() {
150 + use doc && local HTML_DOCS=( html/. )
151 +
152 + distutils-r1_python_install_all
153 +}