1 |
commit: d7ae64cb630810855989fa79731f9754bd44ce57 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 5 07:51:31 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 5 09:25:30 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7ae64cb |
7 |
|
8 |
dev-python/pymongo: Bump to 3.11.4 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pymongo/Manifest | 1 + |
13 |
dev-python/pymongo/pymongo-3.11.4.ebuild | 115 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 116 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pymongo/Manifest b/dev-python/pymongo/Manifest |
17 |
index 57156277fa0..7f5d2a062c4 100644 |
18 |
--- a/dev-python/pymongo/Manifest |
19 |
+++ b/dev-python/pymongo/Manifest |
20 |
@@ -1,4 +1,5 @@ |
21 |
DIST mongo-python-driver-3.11.1.tar.gz 981098 BLAKE2B 27c24a16fe685dda728eadee7784596178ef8ca50d4017bd38ec1bd5ffb29a6eb2e2b24db82cb7d1fe545c58575b3e83d54bfda645eb6dca0d4678e59f7d201b SHA512 459218ae2b4783dc1ec0fb63be62f38c138bc074b6685e3785840b7ed38472a579ba3bd92ceee3a27757b38975963911dab3235f0eba1cc261e083d8e020f462 |
22 |
DIST mongo-python-driver-3.11.2.tar.gz 982527 BLAKE2B 3dcbf57a1cb0a09f9747c1a4770f4935b1c5f524f14392a3a1ce2ee6d3c6f72dc08d96d81300dd7bf7fcd7e5eeb0d6d8af7ac8240f41b460952046d30e8fa3a5 SHA512 110be1c6301f0f5511ed0d8a0cccc1e79c4a1a217bef486afebd2238522735d1e0e2a930533d05194aa485db65c4555bd46dbcf5808a33b2b07bc907055f2b7e |
23 |
DIST mongo-python-driver-3.11.3.tar.gz 983013 BLAKE2B 944c7a7966571a4c2d73df4728f1290cda1112f9a4222c6edea7515063165b2bf98573f7adaf188fb5eb47f9f11dc5b8641848a538b4df4bc0c8ade291517e4f SHA512 20c086e06a91cec23b8a8f3673f8499e5b4bd616090a01f389d9855ab0876be1a86daad524adbc53b716bbb19b9129c8087c7bf13495b1d083dc64d10a335e7c |
24 |
+DIST mongo-python-driver-3.11.4.tar.gz 983009 BLAKE2B b2ca8d90a34b41c0991b545626853137b6a7f5f006dbb5d7a93fd8312759b53b99415583ca5ba982abb420db8502cb9de745f1ac0962efa05eb05ecb4289c323 SHA512 ecd2ff41ab902423dc58901cd9a8355e200f5b00a4eea4a8e950de75674fd59f7367df1ab7ee6c09bf515b8fa110cac0f7de084fbe14527486a9c38a0c8c9c27 |
25 |
DIST pymongo-3.11.0.tar.gz 771691 BLAKE2B 5ae5b78caac335656c1005666c5633882da517c512bbfdb0df2c4569ec5060fa9623a23f48ffcf0c6ab2cdc69f6534f36ef18c929047bbb22cfbe9055a0881b7 SHA512 4f8a185013cbb3c07774d3c6aecc9e97dabb4ba55176fa8a51e17bcdb7cbbebaacd16304e580b4c6aeb26aad964401249313b59dde3c5c248c4496d64d18b22c |
26 |
|
27 |
diff --git a/dev-python/pymongo/pymongo-3.11.4.ebuild b/dev-python/pymongo/pymongo-3.11.4.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..8e7623f0e0d |
30 |
--- /dev/null |
31 |
+++ b/dev-python/pymongo/pymongo-3.11.4.ebuild |
32 |
@@ -0,0 +1,115 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_{7..9} ) |
39 |
+inherit check-reqs distutils-r1 |
40 |
+ |
41 |
+MY_P=mongo-python-driver-${PV} |
42 |
+DESCRIPTION="Python driver for MongoDB" |
43 |
+HOMEPAGE="https://github.com/mongodb/mongo-python-driver https://pypi.org/project/pymongo/" |
44 |
+SRC_URI=" |
45 |
+ https://github.com/mongodb/mongo-python-driver/archive/${PV}.tar.gz |
46 |
+ -> ${MY_P}.tar.gz" |
47 |
+S=${WORKDIR}/${MY_P} |
48 |
+ |
49 |
+LICENSE="Apache-2.0" |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~amd64 ~arm64 ~hppa ~x86" |
52 |
+IUSE="doc kerberos" |
53 |
+ |
54 |
+RDEPEND=" |
55 |
+ kerberos? ( dev-python/pykerberos[${PYTHON_USEDEP}] ) |
56 |
+" |
57 |
+BDEPEND=" |
58 |
+ test? ( |
59 |
+ >=dev-db/mongodb-2.6.0 |
60 |
+ ) |
61 |
+" |
62 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
63 |
+ |
64 |
+distutils_enable_sphinx doc |
65 |
+distutils_enable_tests nose |
66 |
+ |
67 |
+reqcheck() { |
68 |
+ if use test; then |
69 |
+ # During the tests, database size reaches 1.5G. |
70 |
+ local CHECKREQS_DISK_BUILD=1536M |
71 |
+ |
72 |
+ check-reqs_${1} |
73 |
+ fi |
74 |
+} |
75 |
+ |
76 |
+pkg_pretend() { |
77 |
+ reqcheck pkg_pretend |
78 |
+} |
79 |
+ |
80 |
+pkg_setup() { |
81 |
+ reqcheck pkg_setup |
82 |
+} |
83 |
+ |
84 |
+src_prepare() { |
85 |
+ # network-sandbox probably |
86 |
+ rm test/test_srv_polling.py || die |
87 |
+ sed -e 's:test_connection_timeout_ms_propagates_to_DNS_resolver:_&:' \ |
88 |
+ -i test/test_client.py || die |
89 |
+ # relies on exact exception message |
90 |
+ sed -e 's:abstract methods:abstract:' \ |
91 |
+ -i test/test_custom_types.py || die |
92 |
+ distutils-r1_src_prepare |
93 |
+} |
94 |
+ |
95 |
+python_test() { |
96 |
+ # Yes, we need TCP/IP for that... |
97 |
+ local DB_IP=127.0.0.1 |
98 |
+ local DB_PORT=27000 |
99 |
+ |
100 |
+ export DB_IP DB_PORT |
101 |
+ |
102 |
+ local dbpath=${TMPDIR}/mongo.db |
103 |
+ local logpath=${TMPDIR}/mongod.log |
104 |
+ |
105 |
+ # Now, the hard part: we need to find a free port for mongod. |
106 |
+ # We're just trying to run it random port numbers and check the log |
107 |
+ # for bind errors. It shall be noted that 'mongod --fork' does not |
108 |
+ # return failure when it fails to bind. |
109 |
+ |
110 |
+ mkdir -p "${dbpath}" || die |
111 |
+ while true; do |
112 |
+ ebegin "Trying to start mongod on port ${DB_PORT}" |
113 |
+ |
114 |
+ LC_ALL=C \ |
115 |
+ mongod --dbpath "${dbpath}" --nojournal \ |
116 |
+ --bind_ip ${DB_IP} --port ${DB_PORT} \ |
117 |
+ --unixSocketPrefix "${TMPDIR}" \ |
118 |
+ --logpath "${logpath}" --fork \ |
119 |
+ && sleep 2 |
120 |
+ |
121 |
+ # Now we need to check if the server actually started... |
122 |
+ if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then |
123 |
+ # yay! |
124 |
+ eend 0 |
125 |
+ break |
126 |
+ elif grep -q 'Address already in use' "${logpath}"; then |
127 |
+ # ay, someone took our port! |
128 |
+ eend 1 |
129 |
+ : $(( DB_PORT += 1 )) |
130 |
+ continue |
131 |
+ else |
132 |
+ eend 1 |
133 |
+ eerror "Unable to start mongod for tests. See the server log:" |
134 |
+ eerror " ${logpath}" |
135 |
+ die "Unable to start mongod for tests." |
136 |
+ fi |
137 |
+ done |
138 |
+ |
139 |
+ local failed |
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 |
+} |