File python-falcon.spec of Package python-falcon
#
# spec file for package python-falcon
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-falcon
Version: 1.4.1
Release: 0
Summary: A web framework for building APIs and app backends
License: Apache-2.0
Group: Development/Languages/Python
Url: http://falconframework.org
Source: https://github.com/falconry/falcon/archive/%{version}.tar.gz
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
Requires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# /SECTION
Requires: %{python_module python-mimeparse >= 1.5.2}
Requires: %{python_module six >= 1.4.0}
Recommends: %{python_module jsonschema}
Recommends: %{python_module ujson}
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
Falcon is a Python framework for building cloud
APIs. It encourages the REST architectural style, and tries to do
as little as possible while remaining effective.
%prep
%setup -q -n falcon-%{version}
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build
%install
%{python_install}
%python_clone -a %{buildroot}%{_bindir}/falcon-bench
%python_clone -a %{buildroot}%{_bindir}/falcon-print-routes
%{python_expand %fdupes %{buildroot}%{python_sitearch}/falcon/}
%post
%{python_install_alternative falcon-bench falcon-print-routes}
%postun
%{python_uninstall_alternative falcon-bench falcon-print-routes}
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst LICENSE
%python_alternative %{_bindir}/falcon-bench
%python_alternative %{_bindir}/falcon-print-routes
%{python_sitearch}/*
%changelog