From 32936f13fe27c37df5193247e15797568b0e1f27055324df2afbc7a0c9a97c5c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 7 Feb 2024 08:41:30 +0000 Subject: [PATCH] Accepting request 1144698 from home:bnavigator:branches:devel:languages:python - Update source file - Replace deprecated %patch0 - Move to PEP517 - Remove old TW python36 flavor directives - Install examples into doc package and properly fdup OBS-URL: https://build.opensuse.org/request/show/1144698 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-falcon?expand=0&rev=51 --- falcon-3.1.3.tar.gz | 4 ++-- python-falcon.changes | 9 +++++++++ python-falcon.spec | 28 +++++++++++++--------------- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/falcon-3.1.3.tar.gz b/falcon-3.1.3.tar.gz index e6e2ec8..8d5592b 100644 --- a/falcon-3.1.3.tar.gz +++ b/falcon-3.1.3.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a0b46f9104790f8581963bc9fdbfd46eb080ac0882a6a61c05a6a9f602943dba -size 1218058 +oid sha256:23335dbccd44f29e85ec55f2f35d5a0bc12bd7a509f641ab81f5c64b65626263 +size 577770 diff --git a/python-falcon.changes b/python-falcon.changes index 7eee13d..d1682f1 100644 --- a/python-falcon.changes +++ b/python-falcon.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Feb 6 17:06:48 UTC 2024 - Ben Greiner + +- Update source file +- Replace deprecated %patch0 +- Move to PEP517 +- Remove old TW python36 flavor directives +- Install examples into doc package and properly fdup + ------------------------------------------------------------------- Sun Feb 4 14:45:28 UTC 2024 - Ben Greiner diff --git a/python-falcon.spec b/python-falcon.spec index 59ac6e5..6df5d56 100644 --- a/python-falcon.spec +++ b/python-falcon.spec @@ -31,9 +31,11 @@ BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module ddt} BuildRequires: %{python_module httpx} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module sphinx-tabs} BuildRequires: %{python_module websockets} +BuildRequires: %{python_module wheel} # TODO: Cython support #BuildRequires: %%{python_module Cython} # SECTION test requirements @@ -54,7 +56,7 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros #Requires: python-Cython Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives Suggests: %{name}-doc BuildArch: noarch %python_subpackages @@ -73,19 +75,16 @@ as little as possible while remaining effective. HTML documentation including API documentation and changelog for %{name}. %prep -%setup -q -n falcon-%{version} -%patch0 -p1 +%autosetup -p1 -n falcon-%{version} # remove unwanted shebang sed -i '1s/^#!.*//' falcon/bench/bench.py falcon/cmd/inspect_app.py falcon/bench/dj/manage.py chmod a-x falcon/bench/dj/manage.py # we don't want to require rapidjson just for testing rm tests/test_media_handlers.py -# Hidden files are evil -rm examples/asgilook/.coveragerc %build export CFLAGS="%{optflags} -fno-strict-aliasing" -%python_build +%pyproject_wheel export PYTHONPATH="$(pwd)" pushd docs make html @@ -93,18 +92,17 @@ rm _build/html/.buildinfo popd %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/falcon-bench %python_clone -a %{buildroot}%{_bindir}/falcon-inspect-app %python_clone -a %{buildroot}%{_bindir}/falcon-print-routes -%{python_expand rm -rf %{buildroot}%{$python_sitelib}/examples - %fdupes %{buildroot}%{$python_sitelib} -} +%python_expand %fdupes %{buildroot}%{$python_sitelib} +mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-doc +cp -ar docs/_build/html examples %{buildroot}%{_defaultdocdir}/%{name}-doc/ +%fdupes %{buildroot}%{_defaultdocdir}/%{name}-doc/ %check export LANG=en_US.UTF8 -# there are no websockets and httpx for python 3.6 -python36_donttest=("--ignore" "tests/asgi") if [ %{python3_version_nodots} -eq 36 ]; then python3_donttest=("--ignore" "tests/asgi") fi @@ -117,15 +115,15 @@ fi %python_uninstall_alternative falcon-bench %files %{python_files} -%doc README.rst CHANGES.rst examples/ +%doc README.rst %license LICENSE %python_alternative %{_bindir}/falcon-bench %python_alternative %{_bindir}/falcon-inspect-app %python_alternative %{_bindir}/falcon-print-routes %{python_sitelib}/falcon -%{python_sitelib}/falcon-%{version}*-info +%{python_sitelib}/falcon-%{version}.dist-info %files -n %{name}-doc -%doc docs/_build/html +%doc %{_defaultdocdir}/%{name}-doc %changelog