summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-02-11 11:48:31 +0000
committerMichał Górny <mgorny@gentoo.org>2013-02-11 11:48:31 +0000
commit7d7e5a3b15dd754593b7d7f23c773737bd0d5034 (patch)
tree43e1a05d77421ed1d20cd0a946046fca55dd0e47 /dev-python/pymongo
parentStable for arm, wrt bug #427550 (diff)
downloadhistorical-7d7e5a3b15dd754593b7d7f23c773737bd0d5034.tar.gz
historical-7d7e5a3b15dd754593b7d7f23c773737bd0d5034.tar.bz2
historical-7d7e5a3b15dd754593b7d7f23c773737bd0d5034.zip
Migrate to distutils-r1. Start test server on a semi-random unocuppied port.
Package-Manager: portage-2.2.0_alpha142/cvs/Linux x86_64 Manifest-Sign-Key: 0x42B9401D
Diffstat (limited to 'dev-python/pymongo')
-rw-r--r--dev-python/pymongo/ChangeLog7
-rw-r--r--dev-python/pymongo/Manifest11
-rw-r--r--dev-python/pymongo/pymongo-2.4.2-r1.ebuild129
3 files changed, 142 insertions, 5 deletions
diff --git a/dev-python/pymongo/ChangeLog b/dev-python/pymongo/ChangeLog
index 8b12964bdad4..a5536d561c43 100644
--- a/dev-python/pymongo/ChangeLog
+++ b/dev-python/pymongo/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-python/pymongo
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pymongo/ChangeLog,v 1.16 2013/01/25 10:45:44 ultrabug Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pymongo/ChangeLog,v 1.17 2013/02/11 11:48:29 mgorny Exp $
+
+*pymongo-2.4.2-r1 (11 Feb 2013)
+
+ 11 Feb 2013; Michał Górny <mgorny@gentoo.org> +pymongo-2.4.2-r1.ebuild:
+ Migrate to distutils-r1. Start test server on a semi-random unocuppied port.
*pymongo-2.4.2 (25 Jan 2013)
diff --git a/dev-python/pymongo/Manifest b/dev-python/pymongo/Manifest
index 07696084d334..c7be9ff6422a 100644
--- a/dev-python/pymongo/Manifest
+++ b/dev-python/pymongo/Manifest
@@ -7,14 +7,17 @@ DIST pymongo-2.4.2.tar.gz 283269 SHA256 6862c85844f1766c261a39022ec7a6b631988cb5
DIST pymongo-2.4.tar.gz 273479 SHA256 11d6a2934188eea6a6b6c55f3a0b1ac610175e6de92b0e5632bb8d90acb3d48d SHA512 cd3bed659614a3d61217bb445e0313494783ff01f25be681b86a24f66692a16c123213625ca5b046d50433c395d8f4b4b2be93e9bcad8f0f392cb7f6b6c60560 WHIRLPOOL 346959547590518bc7747f3e6a84013b0931743ae485b88293c6974ddc564884a70f8b2c6f5e33b8f1c65a9d5b547a43090bf01028613278f096cecf5d5509d1
EBUILD pymongo-2.3.ebuild 1595 SHA256 c00c35360ba4d3136131833c87d91edaefee9e58ac61d08f237a6a2d598ffcf2 SHA512 dedd29e7f676cad30a5a805753a16548d8a1edab19ea3c59a004f33c05a218714f1c317f7db0b873bc4e6697f05e8c8e1e184e7a816fc2f98a704ff55759bf5b WHIRLPOOL e512901c958fe57df883ec4d00b6370c0b13384270ef9041a6b0fbe56f014ca7a41b1fd8f6fe7b1bb98eb6423760076cc6563773f37118110a6c090d8b0105a8
EBUILD pymongo-2.4.1.ebuild 1755 SHA256 665a9a34208ccd25ed4a872f23136df84ea5ceecd7797c54f144def36091f1db SHA512 13f73c5805659e06edd0620a955168aa504ad6f80ff8d1935153d06ff562703a57f16ab52aa7cb582bad5f21ddd68daecf649aa865b42292edfae978165f3259 WHIRLPOOL a25ac692d66191891c11aa645415d55e49f2400cc2eb093706c273dead270ab66edfd2056beb25786fb0c0bb2f5fe0f4f5f98abf27657f4096ce4d2f492d386e
+EBUILD pymongo-2.4.2-r1.ebuild 3123 SHA256 f39266abf32e1d92180300510a3957cc5e14b2936863a0a425eb9a7b7268ed7e SHA512 a799542c40946d0634db89bac5e3089ee54c0e4e21609a17945869c0f997c7d870aa6f25bd2a25612cea6fe4b2c0cdf6570b4d3a72bc684090beaa105ce8832d WHIRLPOOL b3f6a0b749f43c53775f1ec0237a89b9bc42611d1920c6ad850bbdcf98b0feed84713a6cf187488ac358dc3df7e1cfb1e7a98bd375115726d7048cc3a8c3c0df
EBUILD pymongo-2.4.2.ebuild 1755 SHA256 58174491643ae82e7332fa1ce2474c138b9b8f3b79926646810200624954d322 SHA512 15888e58c5fe99372ec96e712e2f2226d581015295c1f2ec225abc914362d0e9124c8229f38a3ed1b7c6f6b62ddd81450d527eb4d360ce9bb2bfe68108714e0e WHIRLPOOL 6758e070092ede1f376a74556d987117ebe11dc9bd1457f5779a996ebe90e16a1c5d2e5cfc8c057371626fe20999860cd40e588a07adf35e00e59f750323be10
EBUILD pymongo-2.4.ebuild 1754 SHA256 cca21980d38d23c61b03aaa135ad630a1a79bd7a5a898f510b9ce8bd67223009 SHA512 c3cab2dac8cf72def98f77dad6515339b0fee4484a0462c248ae0b710f0289bed04a5478c6bdac5e88293ea84a682ddb832e149cdeedceeef48ae00ccb85f189 WHIRLPOOL c560855551918cb42c1884bdc8e65b592b8b641cf236da60732cd64617a7b85a9effa93987b146ec8fbe0d9d0b95a1adf71a9028fb102cd56c6198c3772fc088
-MISC ChangeLog 2688 SHA256 242d730d2cb5af0ffd15cf93198490926f74a2ac073a8b7147d23512bf9e0000 SHA512 f6aa4d26268a358e0e334768f7b1e5c80af66a8d48e78b7b2abd3fcfae43b91a78fc985e7e3a35cfa527f7a5c4a15733ab6e76ce2a6e85a9726f8958426dfff0 WHIRLPOOL 19de942ead86abc38c2aa4aed3ec026f9c5c153f10e14e5049eb133550c506d3f410d6df25bb86f501b45f26f899d3afa061ce4391f9c11fae8bba1aba38914b
+MISC ChangeLog 2875 SHA256 bffaf700206a172a6d22233262bafab862983bb7c10671cdfb7dde247dde0767 SHA512 80d49f54f6267a6bc872a6a728925915780f648f39a8218e7909d36c1207a8af9d0d0ef34574340519d379382236e73d42a9fb4c6abdfb5d33b87033fa7513a0 WHIRLPOOL c503448b41df1970393a81af83554249ccf4ffbdaa88e8727c2fce14c5916974ad11bcb16ac0567ec1877885f22250d134cf16a5d601d4c0635fd27dd92321f1
MISC metadata.xml 906 SHA256 f89bda842f27c643e960ed4e775bd7f4ff7c815cc7a1dbc4f760325df0fc0efb SHA512 df6bd43618b0e91d7e9161252d5f3b24508be43c03254653b8084e06870273c49402872f30748b9d5488bfbc4bdadb156973e7ff1607633f120b3fc02c589bc7 WHIRLPOOL cd00b7d9f8221ab452fbba7ae1995e91cad8d31d93567449dc6b3644b0caac9ba68db610593f15fcb0c6bc2e6ac5afcca54631e9de0931142d989343776ce2f6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iF4EAREIAAYFAlECYl0ACgkQKiQSS7ZY+hOWXQD/QDWFB+v41N3RUlMLiUkbeClP
-fRuUF3hdUN+ASQ2WlSMA/Ahp2gYyV53o2WO1Q4M+vOPc2xVwXsMj1pYQyEqxV1t1
-=LWYJ
+iJwEAQEIAAYFAlEY2pcACgkQfXuS5UK5QB2czgP/Wq2TFMcjDjgROLBJEgkEkGuJ
+PnSdtKZzBY5uIKXnjuyrkjg6roONcoRc1RgFRno8cXSa+YJZeIMGx3eVGKzJDMH6
+VPpn/HJ7zyjkNLgt+j2feW7rlqE8os4pKizGi91DhYBYaR+CT1h7BLPs6eWxdrdq
+X1Kud9Q7a+1DG7fYCiA=
+=Mbse
-----END PGP SIGNATURE-----
diff --git a/dev-python/pymongo/pymongo-2.4.2-r1.ebuild b/dev-python/pymongo/pymongo-2.4.2-r1.ebuild
new file mode 100644
index 000000000000..9ad8005a0534
--- /dev/null
+++ b/dev-python/pymongo/pymongo-2.4.2-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pymongo/pymongo-2.4.2-r1.ebuild,v 1.1 2013/02/11 11:48:29 mgorny Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_9,2_0} )
+
+inherit check-reqs distutils-r1
+
+DESCRIPTION="Python driver for MongoDB"
+HOMEPAGE="http://github.com/mongodb/mongo-python-driver http://pypi.python.org/pypi/pymongo"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc mod_wsgi test"
+
+RDEPEND="dev-db/mongodb"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+reqcheck() {
+ if use test; then
+ # During the tests, database size reaches 1.5G.
+ local CHECKREQS_DISK_BUILD=1536M
+
+ check-reqs_${1}
+ fi
+}
+
+pkg_pretend() {
+ reqcheck pkg_pretend
+}
+
+pkg_setup() {
+ reqcheck pkg_setup
+}
+
+python_compile_all() {
+ if use doc; then
+ mkdir html || die
+ sphinx-build doc html || die
+ fi
+}
+
+src_test() {
+ # Yes, we need TCP/IP for that...
+ local DB_IP=127.0.0.1
+ local DB_PORT=27017
+
+ export DB_IP DB_PORT
+
+ # 1.5G of disk space per run.
+ local DISTUTILS_NO_PARALLEL_BUILD=1
+
+ distutils-r1_src_test
+}
+
+python_test() {
+ local dbpath=${TMPDIR}/mongo.db
+ local logpath=${TMPDIR}/mongod.log
+
+ # Now, the hard part: we need to find a free port for mongod.
+ # We're just trying to run it random port numbers and check the log
+ # for bind errors. It shall be noted that 'mongod --fork' does not
+ # return failure when it fails to bind.
+
+ mkdir -p "${dbpath}" || die
+ while true; do
+ ebegin "Trying to start mongod on port ${DB_PORT}"
+
+ LC_ALL=C \
+ mongod --dbpath "${dbpath}" --smallfiles --nojournal \
+ --bind_ip ${DB_IP} --port ${DB_PORT} \
+ --unixSocketPrefix "${TMPDIR}" \
+ --logpath "${logpath}" --fork \
+ && sleep 2
+
+ # Now we need to check if the server actually started...
+ if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then
+ # yay!
+ eend 0
+ break
+ elif grep -q 'Address already in use' "${logpath}"; then
+ # ay, someone took our port!
+ eend 1
+ : $(( DB_PORT += 1 ))
+ continue
+ else
+ die "${TMPDIR}"/mongodb-${DB_PORT}.sock
+ eend 1
+ eerror "Unable to start mongod for tests. See the server log:"
+ eerror " ${logpath}"
+ die "Unable to start mongod for tests."
+ fi
+ done
+
+ local failed
+ nosetests || failed=1
+
+ mongod --dbpath "${dbpath}" --shutdown
+
+ [[ ${failed} ]] && die "Tests fail with ${EPYTHON}"
+
+ rm -rf "${dbpath}"
+}
+
+python_install() {
+ # Maintainer note:
+ # In order to work with mod_wsgi, we need to disable the C extension.
+ # See [1] for more information.
+ # [1] http://api.mongodb.org/python/current/faq.html#does-pymongo-work-with-mod-wsgi
+ distutils-r1_python_install $(use mod_wsgi && echo --no_ext)
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( html/. )
+
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ ewarn "Important changes on this release, make sure to read the changelog:"
+ ewarn "http://api.mongodb.org/python/${PV}/changelog.html"
+}