Drop build dependency on mongodb-server.
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
This commit is contained in:
parent
acdb768680
commit
2bc9131ea4
@ -2,7 +2,7 @@
|
||||
|
||||
Name: python-pymongo
|
||||
Version: 3.7.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
# All code is ASL 2.0 except bson/time64*.{c,h} which is MIT
|
||||
License: ASL 2.0 and MIT
|
||||
@ -15,16 +15,9 @@ Source0: https://github.com/mongodb/mongo-python-driver/archive/%{version
|
||||
Patch01: 0001-Use-ssl.match_hostname-from-the-Python-stdlib.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
%ifnarch armv7hl ppc64 s390 s390x
|
||||
# These are needed for tests, and the tests don't work on armv7hl.
|
||||
# MongoDB server is not available on big endian arches (ppc64, s390(x)).
|
||||
%if 0%{!?bootstrap:1}
|
||||
BuildRequires: mongodb-server
|
||||
BuildRequires: python3-sphinx
|
||||
%endif
|
||||
BuildRequires: net-tools
|
||||
BuildRequires: procps-ng
|
||||
%endif
|
||||
BuildRequires: python3-tools
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
@ -99,32 +92,6 @@ chmod 755 %{buildroot}%{python3_sitearch}/bson/*.so
|
||||
chmod 755 %{buildroot}%{python3_sitearch}/pymongo/*.so
|
||||
|
||||
|
||||
%check
|
||||
# For some reason, the tests never think they can connect to mongod on armv7hl even though netstat
|
||||
# says it's listening. mongod is not available on big endian arches (ppc64, s390(x)).
|
||||
%ifnarch armv7hl ppc64 s390 s390x
|
||||
%if 0%{!?bootstrap:1}
|
||||
|
||||
if [ "$(netstat -ln | grep :27017)" != "" ]
|
||||
then
|
||||
pkill mongod
|
||||
fi
|
||||
|
||||
mkdir ./mongod
|
||||
mongod --fork --dbpath ./mongod --logpath ./mongod/mongod.log
|
||||
# Give MongoDB some time to settle
|
||||
while [ "$(netstat -ln | grep :27017)" == "" ]
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
python3 setup.py test || (pkill mongod && exit 1)
|
||||
|
||||
pkill mongod
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
%files doc
|
||||
%license LICENSE
|
||||
%if 0%{!?bootstrap:1}
|
||||
@ -152,6 +119,10 @@ pkill mongod
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Mar 26 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 3.7.2-2
|
||||
- Drop build dependency on mongodb-server, since it is no longer shipped in Fedora.
|
||||
- As a result of the above, we no longer run the tests.
|
||||
|
||||
* Thu Feb 28 2019 Yatin Karel <ykarel@redhat.com> - 3.7.2-1
|
||||
- Update to 3.7.2
|
||||
- http://api.mongodb.com/python/3.7.2/changelog.html
|
||||
|
||||
Loading…
Reference in New Issue
Block a user