dev-python/pymongo: version bump to 3.4.0
authorZac Medico <zmedico@gentoo.org>
Thu, 15 Dec 2016 20:45:35 +0000 (12:45 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 15 Dec 2016 20:45:35 +0000 (12:45 -0800)
Package-Manager: portage-2.3.3

dev-python/pymongo/Manifest
dev-python/pymongo/pymongo-3.4.0.ebuild [new file with mode: 0644]

index 0d76a850d346c0142e715ab37fc0dcaf9d2f0255..1843082e597183ce17ab42e4ed09728c5aa1aa3b 100644 (file)
@@ -6,3 +6,4 @@ DIST pymongo-3.0.3.tar.gz 419692 SHA256 3c6b2317f8031bc1e200fd1ea35f00a96f4569e3
 DIST pymongo-3.1.1.tar.gz 462020 SHA256 98f550d27481cb841c0f5de023df644e7a3beb235b8a22a091e6dafd39c6a82a SHA512 8b11bff856736e997b50f22aec5ecb350c4407569ea4f5cdfdcdbf81250b2ddb4124d4ce1fc0bcf2392aae19fdfda5c15b2504c10141159218f257dc27dc77e5 WHIRLPOOL 03be4b4b5ff438f7a6a85a102964a1e23899521744d2b8d74b074d1a87defb429aa592b4335ed8eb8fe750340a59fc61f10e79286a096afa51c0d32dd8c73e64
 DIST pymongo-3.2.2.tar.gz 504184 SHA256 f2018165823b341d83d398165d1c625e5db5cc779e7c44c107034407808463b6 SHA512 f1e8afd41cf8b1fafe777365e33baedfe7626e3ff311428bf59e2bf0a247aa03ced0d32f37bfb349ff2e54aa22a06f763d04787087add7222e0d8f68c5f73eae WHIRLPOOL a3f6b442316ca2fb6db54eb640f06b7d8fc3f4f8c1bd22cac167c58737c2daaadd055581a6372a443e91fff0829a6bb013a2fe602c92332d767a60257d11629b
 DIST pymongo-3.3.0.tar.gz 494736 SHA256 3d45302fc2622fabf34356ba274c69df41285bac71bbd229f1587283b851b91e SHA512 c58189acf01d4fa6f455ee7773d281223a6a537ddb8229e2f18137c1915003da5420cd9eb82bed2b84e1cb16b9a2e831b673b4017987d6a4b154df508cac6738 WHIRLPOOL d58a9c52d579817316ff99a1c2efe29941f2f8f480f062160876b619a73f8741060164d843d4877796ac020a251b6e189509d313eab947831107549ad3643129
+DIST pymongo-3.4.0.tar.gz 583303 SHA256 d359349c6c9ff9f482805f89e66e476846317dc7b1eea979d7da9c0857ee2721 SHA512 c59dcc08803f23134aa4a86605fab0f5c59b829325b632fc1e0149f20018a544b3d65f3c1fda6066248cd258715339b1771ca8d40c38be02c301f5b6421abd1b WHIRLPOOL c57dfa17ed0940d2ef956c2ae3dca91375b9f7fcc4e78ba3d809d838285f433141bbf8cd0a46498f1c8332e9731f6f06a40c89ba69568abe51c65c59ef03ac11
diff --git a/dev-python/pymongo/pymongo-3.4.0.ebuild b/dev-python/pymongo/pymongo-3.4.0.ebuild
new file mode 100644 (file)
index 0000000..2683f16
--- /dev/null
@@ -0,0 +1,121 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
+
+inherit check-reqs distutils-r1
+
+DESCRIPTION="Python driver for MongoDB"
+HOMEPAGE="https://github.com/mongodb/mongo-python-driver https://pypi.python.org/pypi/pymongo"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="doc kerberos test"
+
+RDEPEND="
+       kerberos? ( dev-python/pykerberos[${PYTHON_USEDEP}] )
+"
+DEPEND="
+       ${RDEPEND}
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+       test? (
+               dev-python/nose[${PYTHON_USEDEP}]
+               >=dev-db/mongodb-2.6.0
+       )
+"
+DISTUTILS_IN_SOURCE_BUILD=1
+
+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
+}
+
+python_test() {
+       # Yes, we need TCP/IP for that...
+       local DB_IP=127.0.0.1
+       local DB_PORT=27000
+
+       export DB_IP DB_PORT
+
+       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
+                       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
+       #https://jira.mongodb.org/browse/PYTHON-521, py2.[6-7] has intermittent failure with gevent
+       pushd "${BUILD_DIR}"/../ > /dev/null
+       if [[ "${EPYTHON}" == python3* ]]; then
+               2to3 --no-diffs -w test
+       fi
+       DB_PORT2=$(( DB_PORT + 1 )) DB_PORT3=$(( DB_PORT + 2 )) esetup.py test || failed=1
+
+       mongod --dbpath "${dbpath}" --shutdown || die
+
+       [[ ${failed} ]] && die "Tests fail with ${EPYTHON}"
+
+       rm -rf "${dbpath}" || die
+}
+
+python_install_all() {
+       use doc && local HTML_DOCS=( html/. )
+
+       distutils-r1_python_install_all
+}