Petr Špaček 273f324
%global srcname lmdb
Petr Špaček 273f324
%global sum Python binding for the LMDB 'Lightning' Database (CPython & CFFI included)
Petr Špaček 273f324
Petr Špaček 273f324
Name:           python-%{srcname}
Petr Špaček 273f324
Version:        0.92
d1f44d5
Release:        14%{?dist}
Petr Špaček 273f324
Summary:        %{sum}
Petr Špaček 273f324
Petr Špaček 273f324
License:        OpenLDAP
Petr Špaček 273f324
URL:            https://github.com/dw/py-lmdb
Petr Špaček 273f324
Source0:        https://pypi.python.org/packages/1b/ac/a1cd245e076d6bd35130a540201d5dbc0d64ecfa1a0bdd8af0c9ea72359d/lmdb-0.92.tar.gz
Petr Špaček 273f324
Petr Špaček 273f324
Patch0:         tests.patch
Petr Špaček 273f324
Patch1:         tests-disable-gh-issue-160.patch
Petr Špaček 273f324
c5ddbb8
BuildRequires:  gcc
6f1f910
BuildRequires:  python3-cffi
6f1f910
BuildRequires:  python3-devel
6f1f910
BuildRequires:  python3-nose
6f1f910
BuildRequires:  lmdb-devel
Petr Špaček 273f324
Petr Špaček 273f324
%description
Petr Špaček 273f324
%{sum}
Petr Špaček 273f324
Petr Špaček 273f324
%package -n python3-%{srcname}
Petr Špaček 273f324
Summary:        %{sum}
Petr Špaček 273f324
%{?python_provide:%python_provide python3-%{srcname}}
Petr Špaček 273f324
Petr Špaček 273f324
%description -n python3-%{srcname}
Petr Špaček 273f324
%{sum}
Petr Špaček 273f324
Petr Špaček 273f324
Petr Špaček 273f324
%prep
Petr Špaček 273f324
%autosetup -n lmdb-%{version}
Petr Špaček 273f324
%patch0 -p1
Petr Špaček 273f324
%patch1 -p1
Petr Špaček 273f324
Petr Špaček 273f324
%build
Petr Špaček 273f324
# do not use bundled LMDB library
Petr Špaček 273f324
export LMDB_FORCE_SYSTEM=1
Petr Špaček 273f324
unset LMDB_FORCE_CFFI
Petr Špaček 273f324
%py3_build
Petr Špaček 273f324
Petr Špaček 273f324
%install
Petr Špaček 273f324
export LMDB_FORCE_SYSTEM=1
Petr Špaček 273f324
unset LMDB_FORCE_CFFI
Petr Špaček 273f324
%py3_install
Petr Špaček 273f324
Petr Špaček 273f324
%check
Petr Špaček 273f324
export LMDB_FORCE_SYSTEM=1
Petr Špaček 273f324
unset LMDB_FORCE_CFFI
Petr Špaček 273f324
Petr Špaček 273f324
# The tests may jump between dirs!
Petr Špaček 273f324
# As a result some tests cannot find the binding in current working directory.
Petr Špaček 273f324
export PYTHONPATH=$(pwd)
Petr Špaček 273f324
nosetests-%{python3_version} -v
Petr Špaček 273f324
# % {__python2} setup.py test
Petr Špaček 273f324
# % {__python3} setup.py test
Petr Špaček 273f324
Petr Špaček 273f324
%files -n python3-%{srcname}
Petr Špaček 273f324
%license LICENSE
Petr Špaček 273f324
%doc ChangeLog
Petr Špaček 273f324
%doc PKG-INFO
Petr Špaček 273f324
%{python3_sitearch}/*
Petr Špaček 273f324
Petr Špaček 273f324
%changelog
d1f44d5
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.92-14
d1f44d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
d1f44d5
909ca7c
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.92-13
909ca7c
- Rebuilt for Python 3.9
909ca7c
381290a
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.92-12
381290a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
381290a
aaf20a4
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.92-11
aaf20a4
- Rebuilt for Python 3.8.0rc1 (#1748018)
aaf20a4
0437043
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.92-10
0437043
- Rebuilt for Python 3.8
0437043
1e79e7b
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.92-9
1e79e7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
1e79e7b
51227f4
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.92-8
51227f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
51227f4
6f1f910
* Wed Oct 17 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.92-7
6f1f910
- Subpackage python2-lmdb has been removed
6f1f910
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
6f1f910
c9e43b6
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.92-6
c9e43b6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
c9e43b6
47486f3
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.92-5
47486f3
- Rebuilt for Python 3.7
47486f3
d1b41ff
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.92-4
d1b41ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d1b41ff
439349a
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.92-3
439349a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
439349a
d49e1fe
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.92-2
d49e1fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
d49e1fe
Petr Špaček 273f324
* Tue Jun 13 2017 Petr Špaček <petr.spacek@nic.cz> - 0.92-1
Petr Špaček 273f324
 Initial build using CPython extension and system LMDB library by default.
Petr Špaček 273f324
Petr Špaček 273f324
 The code was imported from PyPI package v0.92 MD5 00520384f53f0c9f6347e681d4bb8140
Petr Špaček 273f324
 + test from Git repo 4651bb3a865c77008ac261443899fe25f88173f2.
Petr Špaček 273f324
Petr Špaček 273f324
 Known problems:
Petr Špaček 273f324
 - crash on put if Environment(writemap=True) and data is too big for FS
Petr Špaček 273f324
   https://github.com/dw/py-lmdb/issues/161
Petr Špaček 273f324
 - crash on Environment(readonly=True).db_open(create=True)
Petr Špaček 273f324
   https://github.com/dw/py-lmdb/issues/160