summaryrefslogtreecommitdiff
path: root/dev-python/pymongo
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pymongo')
-rw-r--r--dev-python/pymongo/Manifest11
-rw-r--r--dev-python/pymongo/metadata.xml28
-rw-r--r--dev-python/pymongo/pymongo-2.7.2.ebuild120
-rw-r--r--dev-python/pymongo/pymongo-2.9.3.ebuild133
-rw-r--r--dev-python/pymongo/pymongo-3.4.0.ebuild120
-rw-r--r--dev-python/pymongo/pymongo-3.5.1.ebuild120
6 files changed, 532 insertions, 0 deletions
diff --git a/dev-python/pymongo/Manifest b/dev-python/pymongo/Manifest
new file mode 100644
index 000000000000..ae1373eebda1
--- /dev/null
+++ b/dev-python/pymongo/Manifest
@@ -0,0 +1,11 @@
+DIST pymongo-2.7.2.tar.gz 381455 SHA256 8fb45e3edec006f4b11580fc579bec7781a8b3201ce0abf31593f086070e51f6 SHA512 0e78495462d670c168e716a7c34e05f6a11a203f0bf9b32c1488608343588a48cbbb76ce715411b310359de19d9cd57c75f80ac7d8195a122a760cec22e8d0c7 WHIRLPOOL 6cb7eedc530908c2fdb17b6e31561d9c860d6fd1edddb4d66288c3fe11bc199ebc58538a70508b2540b827077f62345a86729644fdf8d37c1b9934de03e77543
+DIST pymongo-2.9.3.tar.gz 433339 SHA256 1a3a75e4998a6b69d9f94c1dbac13116aee90a3f26d02f02fc0289f9e8b332c8 SHA512 7b0c46ef1ca27e8c4d99d00c764aa1ce7775503d5210513ca848215fe0be847871c6d62d14f365474606b4abfdb7d1967d3f393e545cdca8929f7fa6a497c32f WHIRLPOOL 84f6041211022326522f16e02313afbd4763f756a89d12e00714718113926ba32d3b384a22b474fe571a30b23ef49c9c1bf5f9faceb9f3d7293fd795475b5ffe
+DIST pymongo-3.4.0.tar.gz 583303 SHA256 d359349c6c9ff9f482805f89e66e476846317dc7b1eea979d7da9c0857ee2721 SHA512 c59dcc08803f23134aa4a86605fab0f5c59b829325b632fc1e0149f20018a544b3d65f3c1fda6066248cd258715339b1771ca8d40c38be02c301f5b6421abd1b WHIRLPOOL c57dfa17ed0940d2ef956c2ae3dca91375b9f7fcc4e78ba3d809d838285f433141bbf8cd0a46498f1c8332e9731f6f06a40c89ba69568abe51c65c59ef03ac11
+DIST pymongo-3.5.1.tar.gz 1332463 SHA256 e820d93414f3bec1fa456c84afbd4af1b43ff41366321619db74e6bc065d6924 SHA512 67526bcc27233b85226d7ef6aacce6dfb848efc88730fb8207c3b610f3943ac813f6c2842b7e514d733a65a2b7ea4f255574732e42372551b1b333e3437fd82f WHIRLPOOL 07793cda79cfc9b8067fb7f7a491e89f757d7d0672a4b049ea94ffc2a00e39f7d08fef0872553a53da0d0034020a5b45950cf7f584ff963bb11a684fabdd5237
+EBUILD pymongo-2.7.2.ebuild 2786 SHA256 0aedf27c56737fc2b0bb56e3f0527457a0e957a8a112e31f9f8aeade92395ec2 SHA512 b15aaf5a063d4525c5c7039fd875336aeb86d9a859ad71de2a95b65c73e572218aac9b1967c0cb6b8e7f6bc6a56f53c12c62abd669a5705b960ba2bec89a3c71 WHIRLPOOL f5b1c2eff04394df1568ce023449bfa0f957501b9c63d9285e93ee40867092285277666ef3a4afd1eca55fc45fac70f3203df8b79afd5be73be3227db9e70583
+EBUILD pymongo-2.9.3.ebuild 2982 SHA256 787bd51ea7d0e51cf534a1d3be170ecac53025caf3811f8d69c5ade54a05a7f6 SHA512 d10266fcc7e39e55f1bfccb913cee46c4ecf71a36669b4716c7d776786b27d6574fb101a027546f5996abb8238f4a2ad98ae7d21fb02d729e77678434ad50457 WHIRLPOOL 24cf3071accd143bf7d4e14933114b164fa30d11b0d3d863c6ee30fbd17b0d534384df522785c1b0f38f2406cbdb2d51b14991e8c055b079381ee25ae222e6db
+EBUILD pymongo-3.4.0.ebuild 2786 SHA256 74a53af982dd17b2466ce8c715d9ceb092ca92f886b0253112129e85784a1441 SHA512 de374b5dcf5e511f45afb4d47ec6953702e0c19fae4636b0760d327ed24e9c03dd02f25af0f6125d666ba8d492875e3ecd98067f4b14a58716e72b4f3bb9f27e WHIRLPOOL 2bb5023f97e054fdfbe8d8fa1c2a1f062e97b6857b46b40da810a10081c216df842e57d66c728a948de8c619a9852aa48fd6bc8abf8bb3f9c3bc8d1066b5a3e4
+EBUILD pymongo-3.5.1.ebuild 2788 SHA256 7cc2450b40217290fbcd39f45eb3e0c990d9a9188cbfe7bb5e92c5de79520860 SHA512 0fa45a241bcd7662e90df0e77c97adfc7b301e6193f64a33a37eebc723fda8aefe6b484118627ae5b98fbe4fa514a9000ccdf6e04da70c921ed653364da1d4c9 WHIRLPOOL ada909c294b496104ec79863a0de86e345ca07a593a221390103ddde15f373b815324718293a5e0e455d77a3abd047f8a67e3b72d54e404198fea1abbfc6ec9c
+MISC ChangeLog 6343 SHA256 ac4605bced7d05dcf5e6671e81773a04c1fcbfc80724c6a9fdf4ad70a6ad46c6 SHA512 c8ebc478f2348f9cb74da4d020af5f5ff8d7d879f1ff3099f87f1eee5c2e8ff02d04ad76c7bc8151f245746aeae86006410e5dcf00b6d7564280b77f90ed40d7 WHIRLPOOL f1d0b8c6f9a2cd2831c9fcaa21e0f2ddd501f069f299562a46245ec69566da285ece4581b7be8726a933f51d4508a7ef702faf798d9e9864857debc96ae732ae
+MISC ChangeLog-2015 8058 SHA256 4013565930e1e46baa14d2f43b8c50ad14826fd00d1ddabc0e70e19e57d1879e SHA512 15cd1780527bd3f0fa9eef5600eab868d94d940d17cce2a407dac28a602fa4743db82ef0f00dafe534ea05992b75d70f590e0342164ba224539edd4f734fdd92 WHIRLPOOL ed73cedf370d82801be6ee2004ab1bd4067b59f421db85434dcca0e6f039d4f100be39f956f3041d9bffc99ea783bf207762c8b7b60b5bc1c9ba33435150efd9
+MISC metadata.xml 949 SHA256 75444636bc2482663e1cd27cc65b7913c4ba43003e70ebe72a50db9ab6a5c1f4 SHA512 8684aa443f14bdccb557005a8156ff769075c96ab61a6f2b6d476bf3b43396df80bcc9b8cc08a1d784fd74e45eaf38983c62d011d6c75486a44da24751a36fde WHIRLPOOL 033dabd8384e73a978925ae4d9e056a2ba2844023fda388cecb2e5d06181020c7b7d35604b35c53d2f26005ca254b327906dc4282df37b37c8e1e9ca9ea84c2d
diff --git a/dev-python/pymongo/metadata.xml b/dev-python/pymongo/metadata.xml
new file mode 100644
index 000000000000..64db28e6758f
--- /dev/null
+++ b/dev-python/pymongo/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>julien@thebault.co</email>
+ <name>Lujeni</name>
+ <description>Proxy-Maintainer, assign bugs</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>ultrabug@gentoo.org</email>
+ <name>Alexys Jacob</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">PyMongo is a Python distribution containing tools
+ for working with MongoDB, and is the recommended way to work
+ with MongoDB from Python.</longdescription>
+ <upstream>
+ <remote-id type="pypi">pymongo</remote-id>
+ <remote-id type="github">mongodb/mongo-python-driver</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pymongo/pymongo-2.7.2.ebuild b/dev-python/pymongo/pymongo-2.7.2.ebuild
new file mode 100644
index 000000000000..9c988e9fbb5a
--- /dev/null
+++ b/dev-python/pymongo/pymongo-2.7.2.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} 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
+}
diff --git a/dev-python/pymongo/pymongo-2.9.3.ebuild b/dev-python/pymongo/pymongo-2.9.3.ebuild
new file mode 100644
index 000000000000..8f425e213ac0
--- /dev/null
+++ b/dev-python/pymongo/pymongo-2.9.3.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} 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_gen_usedep 'python2*')] )
+ 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_docs() {
+ if use doc; then
+ python_setup 'python2*'
+ mkdir html || die
+ sphinx-build doc html || die
+ fi
+}
+
+python_install_docs() {
+ if use doc; then
+ python_setup 'python2*'
+ local HTML_DOCS=( html/. )
+ einstalldocs
+ 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
+}
+
+src_compile() {
+ distutils-r1_src_compile
+ python_compile_docs
+}
+
+src_install() {
+ distutils-r1_src_install
+ python_install_docs
+}
diff --git a/dev-python/pymongo/pymongo-3.4.0.ebuild b/dev-python/pymongo/pymongo-3.4.0.ebuild
new file mode 100644
index 000000000000..34dcb88ed5f9
--- /dev/null
+++ b/dev-python/pymongo/pymongo-3.4.0.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} 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
+}
diff --git a/dev-python/pymongo/pymongo-3.5.1.ebuild b/dev-python/pymongo/pymongo-3.5.1.ebuild
new file mode 100644
index 000000000000..01c003201d56
--- /dev/null
+++ b/dev-python/pymongo/pymongo-3.5.1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} 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
+}