forked from pool/python-falcon
Accepting request 517594 from home:sebix:branches:devel:languages:python
- disable Cython-build because of failing tests - update to 1.2.0: - update to 1.1.0: OBS-URL: https://build.opensuse.org/request/show/517594 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-falcon?expand=0&rev=16
This commit is contained in:
committed by
Git OBS Bridge
parent
f559b6c9e4
commit
780867e163
@@ -16,57 +16,95 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_without test
|
||||
Name: python-falcon
|
||||
Version: 1.0.0
|
||||
Version: 1.2.0
|
||||
Release: 0
|
||||
Summary: A supersonic micro-framework for building cloud APIs
|
||||
Summary: An unladen web framework for building APIs and app backends
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Url: http://falconframework.org
|
||||
Source: https://pypi.io/packages/source/f/falcon/falcon-%{version}.tar.gz
|
||||
BuildRequires: python-Cython
|
||||
BuildRequires: python-devel
|
||||
# Test requirements:
|
||||
BuildRequires: python-PyYAML
|
||||
BuildRequires: python-ddt
|
||||
BuildRequires: python-nose
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
BuildRequires: python-ordereddict
|
||||
Source: https://github.com/falconry/falcon/archive/%{version}.tar.gz
|
||||
# The file on pypi misses docs/ext, should be fixed in next version
|
||||
#Source: https://files.pythonhosted.org/packages/source/f/falcon/falcon-%%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
# SECTION test requirements
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module ddt}
|
||||
BuildRequires: %{python_module fixtures >= 1.3.0}
|
||||
BuildRequires: %{python_module pytest-runner}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module python-mimeparse >= 1.5.2}
|
||||
BuildRequires: %{python_module requests}
|
||||
BuildRequires: %{python_module six >= 1.4.0}
|
||||
BuildRequires: %{python_module testtools}
|
||||
%endif
|
||||
BuildRequires: python-requests
|
||||
BuildRequires: python-six
|
||||
BuildRequires: python-testtools
|
||||
# /SECTION
|
||||
# SECTION docs
|
||||
BuildRequires: python3-Sphinx
|
||||
# /SECTION
|
||||
Requires: python-python-mimeparse
|
||||
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
|
||||
Suggests: %{name}-doc
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%package -n %{name}-doc
|
||||
Summary: Documentation files for %name
|
||||
Group: Documentation/HTML
|
||||
Provides: %{python_module falcon-doc = %version}
|
||||
|
||||
%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.
|
||||
|
||||
%description -n %{name}-doc
|
||||
HTML documentation including API documentation and changelog for %name.
|
||||
|
||||
%prep
|
||||
%setup -q -n falcon-%{version}
|
||||
# remove unwanted shebang
|
||||
sed -i '1 { /^#!/ d }' falcon/bench/bench.py
|
||||
sed -i '1s/^#!.*//' falcon/bench/bench.py falcon/cmd/print_routes.py
|
||||
|
||||
%build
|
||||
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
%python_build
|
||||
pushd docs
|
||||
PYTHONPATH=$PATH:.. make html
|
||||
rm _build/html/.buildinfo
|
||||
popd
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
%{python_install}
|
||||
%python_clone -a %{buildroot}%{_bindir}/falcon-bench
|
||||
%python_clone -a %{buildroot}%{_bindir}/falcon-print-routes
|
||||
%{python_expand %fdupes %{buildroot}%{$python_sitelib}/falcon/}
|
||||
|
||||
%check
|
||||
python setup.py -q test
|
||||
%{python_exec setup.py -q test}
|
||||
|
||||
%files
|
||||
%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
|
||||
%{_bindir}/falcon-bench
|
||||
%{python_sitearch}/*
|
||||
%doc README.rst LICENSE
|
||||
%python_alternative %{_bindir}/falcon-bench
|
||||
%python_alternative %{_bindir}/falcon-print-routes
|
||||
%{python_sitelib}/*
|
||||
|
||||
%files -n %{name}-doc
|
||||
%doc docs/_build/html
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user