Blob Blame History Raw
%global modname sanic

%{?python_enable_dependency_generator}

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

License:        MIT
URL:            https://github.com/huge-success/sanic
Source0:        %{url}/archive/v%{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-beautifulsoup4
BuildRequires:  python3-gunicorn

BuildRequires:  python3dist(httptools) >= 0.0.9
BuildRequires:  python3dist(uvloop) >= 0.5.3
BuildRequires:  python3dist(ujson) >= 1.35
BuildRequires:  python3dist(aiofiles) >= 0.3
BuildRequires:  (python3dist(websockets) >= 6 with python3dist(websockets) < 7)
BuildRequires:  (python3dist(multidict) >= 4 with python3dist(multidict) < 5)

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

%prep
%autosetup -n %{modname}-%{version} -p1
sed -i -e "s/command = 'gunicorn /command = 'gunicorn-%{python3_version} /" tests/test_worker.py

%build
%py3_build

%install
%py3_install

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

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

%changelog
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.8.0-4
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sun Sep 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.0-1
- Update to 0.8.0

* Thu Jul 19 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.7.0-1
- Update to 0.7.0

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-4
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Fri Jan 19 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.0-2
- Enable usage of dependency generator

* Tue Oct 31 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.0-1
- Update to 0.6.0

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Thu Mar 23 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.1-1
- Update to 0.4.1

* Sat Feb 11 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.1-1
- Update to 0.3.1

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* 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