dfc41d0
%global pypi_name django-tastypie
dfc41d0
Name:           python-%{pypi_name}
6ba5369
Version:        0.13.3
6ba5369
Release:        1%{?dist}
9d10047
Summary:        A flexible and capable API layer for Django
9d10047
9d10047
Group:          Development/Languages
9d10047
License:        BSD
dfc41d0
URL:            https://github.com/toastdriven/django-tastypie/
c3f3a69
c31293e
# Release version doesn't include tests
6ba5369
Source0:        https://github.com/%{pypi_name}/%{pypi_name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
e8fd1e7
9d10047
BuildArch:      noarch
dfc41d0
# Let's keep Requires and BuildRequires sorted alphabetically
9d10047
BuildRequires:  python2-devel
dfc41d0
BuildRequires:  python-setuptools
dfc41d0
BuildRequires:  python-sphinx
dfc41d0
dfc41d0
%if 0%{?rhel}
dfc41d0
Requires:       python-dateutil15
dfc41d0
# also require setuptools to be able to use 'require' function from pkg_resources module
dfc41d0
Requires:       python-setuptools
dfc41d0
%else
bd93d9c
Requires:       python-dateutil
dfc41d0
%endif
bd93d9c
dfc41d0
%if 0%{?fedora} >= 18
dfc41d0
Requires:       python-django >= 1.2.0
dfc41d0
%else
9d10047
Requires:       Django >= 1.2.0
dfc41d0
%endif
dfc41d0
Requires:       python-mimeparse >= 0.1.3
9d10047
dfc41d0
Provides:       %{pypi_name} = %{version}-%{release}
dfc41d0
Obsoletes:      %{pypi_name} < 0.9.11-3 
9d10047
9d10047
%description
9d10047
Tastypie is an webservice API framework for Django. It provides a convenient, 
9d10047
yet powerful and highly customizable, abstraction for creating REST-style 
9d10047
interfaces.
9d10047
9d10047
%package doc
9d10047
Summary: Documentation for %{name}
9d10047
Group: Documentation
9d10047
9d10047
Requires: %{name} = %{version}-%{release}
9d10047
9d10047
%description doc
9d10047
This package contains documentation for %{name}.
9d10047
9d10047
9d10047
%prep 
c31293e
%setup -q -n %{pypi_name}-%{version}
5df5c7d
dfc41d0
# (re)generate the documentation
cf88290
#pushd docs
dfc41d0
sphinx-build docs docs/_build/html
cf88290
#make html
cf88290
#popd
0be4205
rm -rf docs/_build/html/.??*
dfc41d0
dfc41d0
# if on RHEL, using dateutils15, we need to alter __init__.py to load them properly
dfc41d0
%if 0%{?rhel}
dfc41d0
cat << 'EOF' >> tastypie/__init__.py
dfc41d0
from pkg_resources import require
dfc41d0
require('python-dateutil')
dfc41d0
EOF
dfc41d0
%endif
9d10047
9d10047
%build
9d10047
%{__python} setup.py build
9d10047
9d10047
%install
9d10047
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
9d10047
9d10047
%files
9d10047
%doc README.rst AUTHORS LICENSE
9d10047
%dir %{python_sitelib}/tastypie
9d10047
%{python_sitelib}/django_tastypie*
9d10047
%{python_sitelib}/tastypie/*
9d10047
9d10047
%files doc
0be4205
%doc docs/_build/html
9d10047
9d10047
%changelog
6ba5369
* Thu Feb 18 2016 Cédric OLIVIER <cedric.olivier@free.fr> - 0.13.3-1
6ba5369
- Update to 0.13.3 (rhbz#1308500)
6ba5369
5e876e4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-2
5e876e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5e876e4
cf88290
* Tue Jan 26 2016 Cédric OLIVIER <cedric.olivier@free.fr> - 0.13.1-1
cf88290
- Update to 0.13.1 (rhbz#1244039)
cf88290
2a3ce36
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.1-2
2a3ce36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2a3ce36
1db9006
* Mon Oct 27 2014 Cédric OLIVIER <cedric.olivier@free.fr> - 0.12.1-1
1db9006
- Update to 0.12.1 (rhbz#1142992)
1db9006
bd93d9c
* Thu Aug 07 2014 Matthias Runge <mrunge@redhat.com> - 0.11.1-4
bd93d9c
- Fix python-dateutil requires
bd93d9c
f8dd573
* Wed Aug 06 2014 Jon Ciesla <limburgher@gmail.com> - 0.11.1-3
f8dd573
- Fix python-dateutil Requires.
f8dd573
79d7a93
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.1-2
79d7a93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
79d7a93
0a6baf2
* Mon May 26 2014 Matthias Runge <mrunge@redhat.com> - 0.11.1-1
0a6baf2
- update to 0.11.1 (rhbz#1100733)
0a6baf2
5df5c7d
* Mon May 19 2014 Matthias Runge <mrunge@redhat.com> - 0.11.0-1
5df5c7d
- update to 0.11.0 (rhbz#959137)
5df5c7d
- remove check section :-(, upstream does not provide tests in tarballs
5df5c7d
0be4205
* Tue Aug 27 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.9.14-4
0be4205
- Fix unversioned docdir issue (rhbz#1001252).
0be4205
- Fix bogus changelog entry.
0be4205
builder 4ecd277
* Sun Aug 11 2013 Cédric OLIVIER <cedric.olivier@free.fr> 0.9.14-3
builder 4ecd277
- Change Docdir to Unversioned Docdir
builder 4ecd277
5f3d0ea
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.14-2
5f3d0ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
5f3d0ea
c3f3a69
* Tue Mar 26 2013 Miro Hrončok <mhroncok@redhat.com> - 0.9.14-1
c31293e
- New version
c31293e
- Using new GitHub rule to get archive with tests
c31293e
- Run tests manually
c31293e
- Added BR python-defusedxml
c31293e
- Dropped dance around release and development versioning
e8fd1e7
- Added patch for Django 1.5
c31293e
29a920c
* Mon Mar 25 2013 Cédric OLIVIER <cedric.olivier@free.fr> 0.9.12-1
29a920c
- Updated to upstream 0.9.12
29a920c
4d466b0
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-0.2.alpha
4d466b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4d466b0
dfc41d0
* Tue Aug 14 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.9.12-0.1.alpha
dfc41d0
- Updated to upstream version 0.9.12-alpha.
dfc41d0
- Adapted the specfile to prerelease versioning.
dfc41d0
- Add some BuildRequires, so that more tests are run (these
dfc41d0
are soft requirements, so they aren't in Requires)
dfc41d0
- Fixed URL to point to upstream, not PyPI.
dfc41d0
- Made the spec compatible with EPEL6.
dfc41d0
440f44c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.11-5
440f44c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
440f44c
9d10047
* Sun Mar 18 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0.9.11-4
9d10047
- Bugfix in obsoletes
9d10047
9d10047
* Sun Mar 18 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0.9.11-3
9d10047
- Removing bundled .egg-info during prep
9d10047
9d10047
* Sat Mar 17 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0.9.11-2
9d10047
- Adding missing buildrequires
9d10047
- Adding info about renaming django-tastypie
9d10047
- Adding check section
9d10047
- Adding documentation subpackage
9d10047
0be4205
* Fri Mar 02 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0.9.11-1
9d10047
- Initial version of the package