File python-falcon.spec of Package python-falcon

#
# spec file for package python-falcon
#
# Copyright (c) 2015 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/
#


Name:           python-falcon
Version:        0.2
Release:        0
Summary:        A supersonic micro-framework for building cloud APIs
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://falconframework.org
Source:         https://pypi.python.org/packages/source/f/falcon/falcon-%{version}.tar.gz
BuildRequires:  python-Cython
BuildRequires:  python-devel
# Test requirements:
BuildRequires:  python-ddt
BuildRequires:  python-nose
BuildRequires:  python-yaml
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires:  python-ordereddict
%endif
BuildRequires:  python-requests
BuildRequires:  python-six
BuildRequires:  python-testtools
Requires:       python-six
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
Requires:       python-ordereddict
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif

%description
Falcon is a high-performance Python framework for building cloud
APIs. It encourages the REST architectural style, and tries to do
as little as possible while remaining highly effective.

%prep
%setup -q -n falcon-%{version}
# remove unwanted shebang
sed -i '1 { /^#!/ d }' falcon/bench/bench.py

%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%check
python setup.py -q test

%files
%defattr(-,root,root,-)
%doc README.rst
%{_bindir}/falcon-bench
%{python_sitearch}/*

%changelog
openSUSE Build Service is sponsored by