# Please don't flush global 'release' tag voluntarily after any upstream update
# since decreasing it can lead to discrepances with packages versioning.
# As a rule, if desired it can be decreased under these conditions:
# 1) 'apsw' upstream version bump in _all_ maintainable Fedora branches;
# 2) in all cases, it can't be less than 'release' tag value in _any_ maintainable
# EPEL branch (currently, "3" in epel7).
%if 0%{?rhel} == 7
%global sqlite_version 3.7.17
%global uprel 1
%global pkg_version %{sqlite_version}-r%{uprel}
%endif
# Deprecated Fedora support dropped, no need to track package versioning there.
%if 0%{?fedora} == 23
%global sqlite_version 3.11.0
%global uprel 1
%global pkg_version %{sqlite_version}-r%{uprel}
%endif
%if 0%{?fedora} == 24
%global sqlite_version 3.13.0
%global uprel 1
%global pkg_version %{sqlite_version}-r%{uprel}
%endif
%if 0%{?fedora} >= 25
%global sqlite_version 3.14.1
%global uprel 1
%global pkg_version %{sqlite_version}-r%{uprel}
%endif
%global real_version %(eval echo %{pkg_version} | %{__sed} 's/-/./')
%filter_provides_in %{python_sitearch}/.*\.so$
%filter_provides_in %{python3_sitearch}/.*\.so$
%filter_setup
Name: python-apsw
Version: %{real_version}
Release: 3%{?dist}
Summary: Another Python SQLite Wrapper
Group: Development/Libraries
License: zlib
URL: https://github.com/rogerbinns/apsw
Source: https://github.com/rogerbinns/apsw/releases/download/%{pkg_version}/apsw-%{pkg_version}.zip
BuildRequires: python2-devel
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: sqlite-devel >= %{sqlite_version}
Requires: sqlite >= %{sqlite_version}
%description
APSW is a Python wrapper for the SQLite embedded relational database
engine. In contrast to other wrappers such as pysqlite it focuses on
being a minimal layer over SQLite attempting just to translate the
complete SQLite API into Python.
%package -n python2-apsw
Summary: Another Python SQLite Wrapper
%{?python_provide:%python_provide python2-apsw}
%description -n python2-apsw
APSW is a Python wrapper for the SQLite embedded relational database
engine. In contrast to other wrappers such as pysqlite it focuses on
being a minimal layer over SQLite attempting just to translate the
complete SQLite API into Python.
%package -n python%{python3_pkgversion}-apsw
Summary: Another Python SQLite Wrapper
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python%{python3_pkgversion}-apsw
APSW is a Python %{python3_version} wrapper for the SQLite embedded relational database
engine. In contrast to other wrappers such as pysqlite it focuses on
being a minimal layer over SQLite attempting just to translate the
complete SQLite API into Python.
%prep
%autosetup -n apsw-%{pkg_version}
rm -f doc/.buildinfo
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
CFLAGS="%{optflags}" python%{python_version} setup.py build_ext --inplace test
CFLAGS="%{optflags}" python%{python3_version} setup.py build_ext --inplace test
%files -n python2-apsw
%doc doc/*
%{python2_sitearch}/apsw*.so
%{python2_sitearch}/apsw*.egg-info
%files -n python%{python3_pkgversion}-apsw
%doc doc/*
%{python3_sitearch}/apsw*.so
%{python3_sitearch}/apsw*.egg-info
%changelog
* Fri Sep 16 2016 Denis Fateyev <denis@fateyev.com> - 3.14.1.r1-3
- Bump upstream version to 3.14.1
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13.0.r1-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Sun Jun 19 2016 Denis Fateyev <denis@fateyev.com> - 3.13.0.r1-3
- Bump upstream version to 3.13.0
* Fri May 20 2016 Denis Fateyev <denis@fateyev.com> - 3.12.2.r1-3
- Bump upstream version to 3.12.2
* Fri Mar 04 2016 Denis Fateyev <denis@fateyev.com> - 3.11.0.r1-3
- Modernize the package spec, bump upstream version
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.11.1.r1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - %{pkg_version}-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Fri Sep 11 2015 Marcel Wysocki <maci@satgnu.net> - 3.8.11.1.r1-2
- Merge different versions into one spec file
* Mon Aug 24 2015 Marcel Wysocki <maci@satgnu.net> - 3.8.11.1.r1-1
- Update to 3.8.11.1-r1 for F24
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.4.3.r1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.4.3.r1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.4.3.r1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 3.8.4.3.r1-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Sat May 10 2014 Peter Robinson <pbrobinson@fedoraproject.org> 3.8.4.3.r1-1
- update to 3.8.4.3r1
* Tue Sep 24 2013 Marcel Wysocki <maci@satgnu.net> - 3.8.0.r2-1
- update to 3.8.0-r2
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.15.2.r1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Marcel Wysocki <maci@satgnu.net> - 3.7.15.2.r1-1
- update to 3.7.15.2-r1
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.11.r1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Nov 19 2012 Marcel Wysocki <maci@satgnu.net> 3.7.11.r1-8
- initial python3 build
* Tue Oct 30 2012 Marcel Wysocki <maci@satgnu.net> 3.7.11.r1-7
- use python2-devel BR instead of python-devel
* Mon Oct 29 2012 Marcel Wysocki <maci@satgnu.net> 3.7.11.r1-6
- removed -doc package, not really needed
* Sun Oct 28 2012 Marcel Wysocki <maci@satgnu.net> 3.7.11.r1-5
- fixed changelog rpmlint error
* Sat Oct 27 2012 Marcel Wysocki <maci@satgnu.net> 3.7.11.r1-4
- use global instead of define macro
- filter private-shared-object-provides
- removed python from requires
* Tue Oct 23 2012 Marcel Wysocki <maci@satgnu.net> 3.7.11.r1-3
- don't use rm macro
- remove doc/.buildinfo
- add missing dependencies
* Fri Oct 05 2012 Marcel Wysocki <maci@satgnu.net> 3.7.11.r1-2
- add missing builddep
* Thu Oct 04 2012 Marcel Wysocki <maci@satgnu.net> 3.7.11.r1-1
- fedora port
- update to 3.7.11-r1
* Wed Nov 30 2011 Dmitry Mikhirev <dmikhirev@mandriva.org> 3.7.7.1.r1-1
+ Revision: 735584
- imported package python-apsw