Matej Stuchlik 89b198e
%global pypi_name peewee
Matej Stuchlik 89b198e
08024da
Name:		python-%{pypi_name}
f4eec4f
Version:	2.9.2
041fb82
Release:	1%{?dist}
08024da
Summary:	A small, expressive orm
08024da
08024da
License:	MIT
08024da
URL:		http://github.com/coleifer/peewee/
08024da
Source0:	https://github.com/coleifer/%{pypi_name}/archive/%{version}.tar.gz
08024da
08024da
BuildRequires:	python2-devel
08024da
BuildRequires:	python2-setuptools
2410b55
BuildRequires:	python2-Cython
1417081
08024da
BuildRequires:	python3-devel
08024da
BuildRequires:	python3-setuptools
2410b55
BuildRequires:	python3-Cython
895df52
#Required for documentation build
08024da
BuildRequires:	python3-sphinx
Matej Stuchlik 89b198e
2410b55
# Required for running the python2 tests
2410b55
BuildRequires:	python2-apsw
2410b55
BuildRequires:	python2-flask
2410b55
2410b55
# Required for running the python3 tests
2410b55
BuildRequires:	python3-apsw
2410b55
BuildRequires:	python3-flask
2410b55
Matej Stuchlik 89b198e
%description
Matej Stuchlik 89b198e
A small, expressive ORM written in python with built-in support for sqlite,
Matej Stuchlik 89b198e
mysql and postgresql and special extensions like hstore. For flask
Matej Stuchlik 89b198e
integration, including an admin interface and RESTful API, check out
Matej Stuchlik 89b198e
flask-peewee.
Matej Stuchlik 89b198e
1417081
%package -n python2-%{pypi_name}
2410b55
c245762
Requires:	python-simplejson
2410b55
08024da
Summary:	A small, expressive orm
1417081
%{?python_provide:%python_provide python2-%{pypi_name}}
1417081
1417081
%description -n python2-%{pypi_name}
1417081
A small, expressive ORM written in python with built-in support for sqlite,
1417081
mysql and postgresql and special extensions like hstore. For flask
1417081
integration, including an admin interface and RESTful API, check out
1417081
flask-peewee.
1417081
1417081
%package -n python3-%{pypi_name}
2410b55
2410b55
Requires:	python3-simplejson
2410b55
08024da
Summary:	A small, expressive orm
1417081
%{?python_provide:%python_provide python3-%{pypi_name}}
1417081
1417081
%description -n python3-%{pypi_name}
1417081
A small, expressive ORM written in python with built-in support for sqlite,
1417081
mysql and postgresql and special extensions like hstore. For flask
1417081
integration, including an admin interface and RESTful API, check out
1417081
flask-peewee.
1417081
Matej Stuchlik 89b198e
%prep
Matej Stuchlik 89b198e
%setup -q -n %{pypi_name}-%{version}
08024da
#Point pwiz.py and pskel to Python 3
08024da
sed -i '1s=^#!/usr/bin/\(python\|env python.*\)$=#!%{__python3}=' pwiz.py playhouse/pskel
895df52
#Remove executable bits
895df52
chmod -x runtests.py examples/analytics/run_example.py examples/twitter/run_example.py
2410b55
#Remove shebangs from files that point to usr/bin/python
895df52
sed -i '1d' runtests.py
895df52
sed -i '1d' examples/analytics/run_example.py
895df52
sed -i '1d' examples/twitter/run_example.py
Matej Stuchlik 89b198e
Matej Stuchlik 89b198e
%build
1417081
%py2_build
1417081
%py3_build
Matej Stuchlik 89b198e
895df52
#Build the documentation
895df52
sphinx-build-3 docs html
895df52
rm -rf html/.{doctrees,buildinfo}
895df52
Matej Stuchlik 89b198e
%install
895df52
%py2_install
2410b55
rm %{buildroot}%{python2_sitearch}/pwiz.*
2410b55
rm %{buildroot}%{_bindir}/pwiz.py
895df52
1417081
%py3_install
2410b55
rm %{buildroot}%{python3_sitearch}/pwiz.*
08024da
rm %{buildroot}%{python3_sitearch}/__pycache__/pwiz.*
895df52
mv %{buildroot}%{_bindir}/{pwiz.py,pwiz}
1417081
Matej Stuchlik 89b198e
%check
2410b55
%{__python2} runtests.py -a \(-e sqlite \)
2410b55
%{__python3} runtests.py -a \(-e sqlite \)
1417081
1417081
%files -n python2-%{pypi_name}
895df52
%doc README.rst html
1417081
%license LICENSE
2410b55
%{python2_sitearch}/peewee.*
2410b55
%{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
2410b55
%{python2_sitearch}/playhouse
1417081
1417081
%files -n python3-%{pypi_name}
895df52
%doc README.rst html
1417081
%license LICENSE
2410b55
%{python3_sitearch}/peewee.py*
2410b55
%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
2410b55
%{python3_sitearch}/playhouse/*
2410b55
%{python3_sitearch}/__pycache__/peewee*
2410b55
%{_bindir}/pwiz
08024da
%{_bindir}/pskel
Matej Stuchlik 89b198e
Matej Stuchlik 89b198e
%changelog
f4eec4f
* Mon Apr 10 2017 Viliam Krizan <vkrizan@redhat.com> - 2.9.2-1
f4eec4f
- Update to 2.9.2
f4eec4f
6627dbe
* Fri Mar 03 2017 Viliam Krizan <vkrizan@redhat.com> - 2.8.8-1
6627dbe
- Update to 2.8.8
6627dbe
14c93a6
* Tue Feb 07 2017 Viliam Krizan <vkrizan@redhat.com> - 2.8.5-2
14c93a6
- Backport upstream fix to force limit and offset to be numeric
14c93a6
1cadc5f
* Mon Jan 09 2017 Charalampos Stratakis <cstratak@redhat.com> - 2.8.5-1
1cadc5f
- Update to 2.8.5
1cadc5f
cb1b8c0
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 2.8.2-4
cb1b8c0
- Rebuild for Python 3.6
cb1b8c0
08024da
* Thu Nov 10 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.8.2-3
08024da
- Make pskel script install under usr/bin/
08024da
- Remove bytecompiled pwiz files
08024da
c245762
* Fri Nov 04 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.8.2-2
c245762
- Change runtime requirement from python2-simplejson to python-simplejson
c245762
2410b55
* Wed Nov 02 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.8.2-1
2410b55
- Update to 2.8.2
1066f12
- Changed the installation directories to be arch dependent as the package
2410b55
is now compiled using Cython
2410b55
2cb02a1
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.2-6
2cb02a1
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2cb02a1
895df52
* Mon Jun 06 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.3.2-5
895df52
- Fix shebangs so python 2 is not dragged with the python 3 subpackage
895df52
- Build documentation
895df52
1417081
* Thu Jun 02 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.3.2-4
1417081
- Provide Python 3 subpackage
1417081
- Move binaries to Python 3 subpackage
1417081
- Modernize SPEC
1417081
d7a90c5
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-3
d7a90c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d7a90c5
5a0cd72
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.2-2
5a0cd72
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5a0cd72
Matej Stuchlik baa80ae
* Mon Sep 29 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.3.2-1
Matej Stuchlik baa80ae
- Update to 2.3.2
Matej Stuchlik baa80ae
Matej Stuchlik 7919a43
* Wed Aug 27 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.3.1-1
Matej Stuchlik 7919a43
- Update to 2.3.1
Matej Stuchlik 7919a43
Matej Stuchlik a8f58d0
* Mon Jun 09 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.2.4-1
Matej Stuchlik a8f58d0
- Update to 2.2.4
Matej Stuchlik a8f58d0
8bf63f3
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.7-2
8bf63f3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8bf63f3
Matej Stuchlik 947b230
* Thu Jan 09 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.1.7-1
Matej Stuchlik 947b230
- Update to 2.1.7
Matej Stuchlik 947b230
Matej Stuchlik 92a9caa
* Tue Aug 13 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.1.4-2
Matej Stuchlik 92a9caa
- Added patch increasing timeout in concurrency test
Matej Stuchlik 92a9caa
Matej Stuchlik a5ba0a2
* Wed Aug 07 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.1.4-1
Matej Stuchlik a5ba0a2
- Updated to 2.1.4
Matej Stuchlik a5ba0a2
0a5dd59
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.9-3
0a5dd59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0a5dd59
Matej Stuchlik 89b198e
* Tue Apr 02 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.0.9-2
Matej Stuchlik 89b198e
- Review fixes
Matej Stuchlik 89b198e
Matej Stuchlik 89b198e
* Fri Mar 29 2013 mstuchli <mstuchli@redhat.com> - 2.0.9-1
Matej Stuchlik 89b198e
- Initial spec