forked from pool/python-falcon
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
This commit is contained in:
BIN
falcon-3.1.3.tar.gz
(Stored with Git LFS)
BIN
falcon-3.1.3.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 6 17:06:48 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- 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 <code@bnavigator.de>
|
Sun Feb 4 14:45:28 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@@ -31,9 +31,11 @@ BuildRequires: %{python_module PyYAML}
|
|||||||
BuildRequires: %{python_module Sphinx}
|
BuildRequires: %{python_module Sphinx}
|
||||||
BuildRequires: %{python_module ddt}
|
BuildRequires: %{python_module ddt}
|
||||||
BuildRequires: %{python_module httpx}
|
BuildRequires: %{python_module httpx}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module sphinx-tabs}
|
BuildRequires: %{python_module sphinx-tabs}
|
||||||
BuildRequires: %{python_module websockets}
|
BuildRequires: %{python_module websockets}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
# TODO: Cython support
|
# TODO: Cython support
|
||||||
#BuildRequires: %%{python_module Cython}
|
#BuildRequires: %%{python_module Cython}
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
@@ -54,7 +56,7 @@ BuildRequires: fdupes
|
|||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
#Requires: python-Cython
|
#Requires: python-Cython
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun): update-alternatives
|
||||||
Suggests: %{name}-doc
|
Suggests: %{name}-doc
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -73,19 +75,16 @@ as little as possible while remaining effective.
|
|||||||
HTML documentation including API documentation and changelog for %{name}.
|
HTML documentation including API documentation and changelog for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n falcon-%{version}
|
%autosetup -p1 -n falcon-%{version}
|
||||||
%patch0 -p1
|
|
||||||
# remove unwanted shebang
|
# remove unwanted shebang
|
||||||
sed -i '1s/^#!.*//' falcon/bench/bench.py falcon/cmd/inspect_app.py falcon/bench/dj/manage.py
|
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
|
chmod a-x falcon/bench/dj/manage.py
|
||||||
# we don't want to require rapidjson just for testing
|
# we don't want to require rapidjson just for testing
|
||||||
rm tests/test_media_handlers.py
|
rm tests/test_media_handlers.py
|
||||||
# Hidden files are evil
|
|
||||||
rm examples/asgilook/.coveragerc
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
export PYTHONPATH="$(pwd)"
|
export PYTHONPATH="$(pwd)"
|
||||||
pushd docs
|
pushd docs
|
||||||
make html
|
make html
|
||||||
@@ -93,18 +92,17 @@ rm _build/html/.buildinfo
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/falcon-bench
|
%python_clone -a %{buildroot}%{_bindir}/falcon-bench
|
||||||
%python_clone -a %{buildroot}%{_bindir}/falcon-inspect-app
|
%python_clone -a %{buildroot}%{_bindir}/falcon-inspect-app
|
||||||
%python_clone -a %{buildroot}%{_bindir}/falcon-print-routes
|
%python_clone -a %{buildroot}%{_bindir}/falcon-print-routes
|
||||||
%{python_expand rm -rf %{buildroot}%{$python_sitelib}/examples
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%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
|
%check
|
||||||
export LANG=en_US.UTF8
|
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
|
if [ %{python3_version_nodots} -eq 36 ]; then
|
||||||
python3_donttest=("--ignore" "tests/asgi")
|
python3_donttest=("--ignore" "tests/asgi")
|
||||||
fi
|
fi
|
||||||
@@ -117,15 +115,15 @@ fi
|
|||||||
%python_uninstall_alternative falcon-bench
|
%python_uninstall_alternative falcon-bench
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst CHANGES.rst examples/
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%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
|
%{python_sitelib}/falcon-%{version}.dist-info
|
||||||
|
|
||||||
%files -n %{name}-doc
|
%files -n %{name}-doc
|
||||||
%doc docs/_build/html
|
%doc %{_defaultdocdir}/%{name}-doc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user