Blob Blame Raw
%global pkgname         flask-restless
%global github_owner    jfinkels
%global github_commit   bbb2f0a1e09821d30dcb2d52a9cdd9026c028b5f
Name:           python-%{pkgname}
Version:        0.17.0
Release:        9%{?dist}
Summary:        Flask-restless provides simple generation of ReSTful APIs
License:        AGPLv3 or BSD
URL:            http://flask-restless.readthedocs.org/
# We use the github source rather than pypi as the pypi distribution
# is missing license files and tests, and some docs
Source0:        https://github.com/%{github_owner}/%{pkgname}/archive/%{github_commit}/%{pkgname}-%{version}.tar.gz
# This test fails upstream and downstream, can't find or work out a
# fix, so let's just disable it for now
Patch0:         0001-drop-failing-test.patch
BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python3-devel
# should provide python2-flask, but doesn't
BuildRequires:  python-flask >= 1:0.10
BuildRequires:  python3-flask >= 1:0.10
# should provide python2-sqlalchemy, but doesn't
BuildRequires:  python-sqlalchemy >= 0.8
BuildRequires:  python3-sqlalchemy >= 0.8
# should provide python2-flask-sqlalchemy, but doesn't
BuildRequires:  python-flask-sqlalchemy
BuildRequires:  python3-flask-sqlalchemy
# should provide provide python2-dateutil, but doesn't
BuildRequires:  python-dateutil > 2.2
BuildRequires:  python3-dateutil > 2.2
BuildRequires:  python2-mimerender >= 0.5.2
BuildRequires:  python3-mimerender >= 0.5.2
BuildRequires:  python2-nose
BuildRequires:  python3-nose
# Some tests are skipped without this, but we have no package for it
#BuildRequires: python2-savalidation
%description
Flask-Restless provides simple generation of ReSTful APIs for database
models defined using SQLAlchemy (or Flask-SQLAlchemy). The generated
APIs send and receive messages in JSON format.
%package -n python2-%{pkgname}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pkgname}}
Requires:       python-flask >= 1:0.10
Requires:       python-sqlalchemy >= 0.8
Requires:       python-flask-sqlalchemy
Requires:       python-dateutil > 2.2
Requires:       python2-mimerender >= 0.5.2
%description -n python2-%{pkgname}
Flask-Restless provides simple generation of ReSTful APIs for database
models defined using SQLAlchemy (or Flask-SQLAlchemy). The generated
APIs send and receive messages in JSON format. This is the Python 2
build of %{pkgname}.
%package -n python3-%{pkgname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pkgname}}
Requires:       python3-flask >= 1:0.10
Requires:       python3-sqlalchemy >= 0.8
Requires:       python3-flask-sqlalchemy
Requires:       python3-dateutil > 2.2
Requires:       python3-mimerender >= 0.5.2
%description -n python3-%{pkgname}
Flask-Restless provides simple generation of ReSTful APIs for database
models defined using SQLAlchemy (or Flask-SQLAlchemy). The generated
APIs send and receive messages in JSON format. This is the Python 3
build of %{pkgname}.
%prep
%autosetup -n %{pkgname}-%{github_commit} -p1
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
%{__python2} setup.py test
%{__python3} setup.py test
%files -n python2-%{pkgname}
%doc AUTHORS CHANGES README
%license LICENSE.AGPL LICENSE.BSD
%{python2_sitelib}/flask_restless*
%{python2_sitelib}/Flask_Restless*
%files -n python3-%{pkgname}
%doc AUTHORS CHANGES README
%license LICENSE.AGPL LICENSE.BSD
%{python3_sitelib}/flask_restless*
%{python3_sitelib}/Flask_Restless*
%changelog
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.17.0-7
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17.0-6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Fri May 27 2016 Till Maas <opensource@till.name> - 0.17.0-5
- Use %%pkgname instead of undefined %%srcname for provides (RH #1337610)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jan 21 2016 Adam Williamson <awilliam@redhat.com> - 0.17.0-3
- modernize spec
- include license files (sourced from github for now, not in pypi tarballs)
- add python3 build
- update dependencies
- rename python2 package to python2-flask-restless per current policy
- correct license to AGPLv3 *or* BSD, not AGPLv3 *and* BSD
- use github not pypi source as pypi source is missing tests and licenses
- disable a failing test
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Feb 20 2015 Yohan Graterol <yohangraterol92@gmail.com> - 0.17.0-1
- Update release
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Mar 29 2014 Yohan Graterol <yohangraterol92@gmail.com> - 0.12.1-1
- New release
* Fri Oct 11 2013 Yohan Graterol <yohangraterol92@gmail.com> - 0.12.0-1
- New release
* Sat Aug 10 2013 Yohan Graterol <yohangraterol92@gmail.com> - 0.11-2
- Change in the install
* Wed Aug 07 2013 Yohan Graterol <yohangraterol92@gmail.com> - 0.11-1
- Initial Packaging