Gentoo Archives: gentoo-commits

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