Blob Blame History Raw
%global modname sanic

Name:           python-%{modname}
Version:        0.2.0
Release:        1%{?dist}
Summary:        Microframework based on uvloop, httptools, and learnings of flask

License:        MIT
URL:            https://github.com/channelcat/sanic
Source0:        %{url}/archive/%{version}/%{modname}-%{version}.tar.gz

BuildArch:      noarch

%global _description \
Sanic is a Flask-like Python 3.5+ web server that's written to go fast.\
It's based on the work done by the amazing folks at magicstack,\
and was inspired by this article:\
https://magic.io/blog/uvloop-blazing-fast-python-networking/.\
\
On top of being Flask-like, Sanic supports async request handlers. This means\
you can use the new shiny async/await syntax from Python 3.5,\
making your code non-blocking and speedy.

%description %{_description}

%package -n python3-%{modname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{modname}}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pytest
BuildRequires:  python3-aiohttp
BuildRequires:  python3-uvloop >= 0.5.3
BuildRequires:  python3-httptools >= 0.0.9
BuildRequires:  python3-ujson >= 1.35
BuildRequires:  python3-aiofiles >= 0.3.0
BuildRequires:  python3-multidict >= 2.0
Requires:       python%{python3_version}dist(uvloop) >= 0.5.3
Requires:       python%{python3_version}dist(httptools) >= 0.0.9
Requires:       python%{python3_version}dist(ujson) >= 1.35
Requires:       python%{python3_version}dist(aiofiles) >= 0.3.0
Requires:       python%{python3_version}dist(multidict) >= 2.0

%description -n python3-%{modname} %{_description}

%prep
%autosetup -n %{modname}-%{version}

%build
%py3_build

%install
%py3_install

%check
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v

%files -n python3-%{modname}
%license LICENSE
%doc README.md CHANGELOG.md
%{python3_sitelib}/Sanic-*.egg-info/
%{python3_sitelib}/%{modname}/

%changelog
* Wed Jan 18 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.2.0-1
- Update to 0.2.0

* Sun Jan 01 2017 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.1.9-1
- Initial package