14
0
forked from pool/python-falcon

Accepting request 933386 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/933386
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-falcon?expand=0&rev=15
This commit is contained in:
2021-11-24 22:54:23 +00:00
committed by Git OBS Bridge
2 changed files with 28 additions and 25 deletions

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue Nov 23 19:28:50 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Don't restrict to primary python3 flavor. Other packages depend
on this.
- Update requirements
* The only runtime deps have been removed in version 2.0
* Test requirements from examples are obsolete
- Implement some python packaging best practises:
* Check for version in dist metadata
* uninstall alternative only takes master (there was even a typo)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 22 16:25:06 UTC 2021 - Matej Cepl <mcepl@suse.com> Mon Nov 22 16:25:06 UTC 2021 - Matej Cepl <mcepl@suse.com>

View File

@@ -16,8 +16,8 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python3-%{**}}
%define pythons python3 %define skip_python2 1
Name: python-falcon Name: python-falcon
Version: 3.0.1 Version: 3.0.1
Release: 0 Release: 0
@@ -33,40 +33,30 @@ Patch0: python-falcon-sphinx-pygments-style.patch
BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module ddt} BuildRequires: %{python_module ddt}
BuildRequires: %{python_module python-mimeparse >= 1.5.2}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.4.0}
BuildRequires: %{python_module sphinx-tabs} BuildRequires: %{python_module sphinx-tabs}
# TODO: Cython support # TODO: Cython support
#BuildRequires: %%{python_module Cython} #BuildRequires: %%{python_module Cython}
%if 0%{?suse_version} >= 1550
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module aiofiles} BuildRequires: %{python_module aiofiles}
BuildRequires: %{python_module aioredis}
BuildRequires: %{python_module cbor2} BuildRequires: %{python_module cbor2}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module fakeredis}
BuildRequires: %{python_module fixtures >= 1.3.0}
BuildRequires: %{python_module jsonschema}
BuildRequires: %{python_module msgpack-python} BuildRequires: %{python_module msgpack-python}
BuildRequires: %{python_module pecan}
BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-httpx}
BuildRequires: %{python_module pytest-runner} BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests} BuildRequires: %{python_module requests}
BuildRequires: %{python_module testtools} BuildRequires: %{python_module testtools}
BuildRequires: %{python_module ujson} BuildRequires: %{python_module ujson}
BuildRequires: %{python_module uvicorn} %if 0%{?suse_version} >= 1550
BuildRequires: %{python_module websockets} BuildRequires: %{python_module httpx if (%python-base without python36-base)}
# /SECTION BuildRequires: %{python_module uvicorn if (%python-base without python36-base)}
BuildRequires: %{python_module websockets if (%python-base without python36-base)}
%endif %endif
# /SECTION
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: python3-pygments-style-railscasts BuildRequires: python3-pygments-style-railscasts
#Requires: python-Cython #Requires: python-Cython
Requires: python-python-mimeparse
Requires: python-six
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun):update-alternatives
Suggests: %{name}-doc Suggests: %{name}-doc
@@ -115,20 +105,20 @@ popd
%fdupes %{buildroot}%{$python_sitelib} %fdupes %{buildroot}%{$python_sitelib}
} }
%if 0%{?suse_version} >= 1550
# We do not have the following package on Leap 15.3
# python-httpx
# python-pytest-trio
%check %check
export LANG=en_US.UTF8 export LANG=en_US.UTF8
%pytest tests # there are no websockets and httpx for python 3.6
%endif python36_donttest=("--ignore" "tests/asgi")
if [ %{python3_version_nodots} -eq 36 ]; then
python3_donttest=("--ignore" "tests/asgi")
fi
%pytest "${$python_donttest[@]}" tests
%post %post
%{python_install_alternative falcon-bench falcon-inspect-app falcon-print-routes} %{python_install_alternative falcon-bench falcon-inspect-app falcon-print-routes}
%postun %postun
%{python_uninstall_alternative falcon-bench falocn-inspect-app falcon-print-routes} %python_uninstall_alternative falcon-bench
%files %{python_files} %files %{python_files}
%doc README.rst CHANGES.rst examples/ %doc README.rst CHANGES.rst examples/
@@ -136,7 +126,8 @@ export LANG=en_US.UTF8
%python_alternative %{_bindir}/falcon-bench %python_alternative %{_bindir}/falcon-bench
%python_alternative %{_bindir}/falcon-inspect-app %python_alternative %{_bindir}/falcon-inspect-app
%python_alternative %{_bindir}/falcon-print-routes %python_alternative %{_bindir}/falcon-print-routes
%{python_sitelib}/falcon* %{python_sitelib}/falcon
%{python_sitelib}/falcon-%{version}*-info
%files -n %{name}-doc %files -n %{name}-doc
%doc docs/_build/html %doc docs/_build/html