commit 776a58b8065716a996eb0060453945235e66cdcf21373bec1194ead5482d4713 Author: Dirk Mueller Date: Tue Jan 30 12:29:23 2024 +0000 Accepting request 1141658 from home:absolutely-vivid I want to maintain python-hypercorn in Factory and would like to use devel:languages:python as the devel project. OBS-URL: https://build.opensuse.org/request/show/1141658 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypercorn?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/0.16.0.tar.gz b/0.16.0.tar.gz new file mode 100644 index 0000000..8db47aa --- /dev/null +++ b/0.16.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fc8578cde36f3b5a08845c2ef37ff2aafb5efcbb40be561f58405fe0b8f88de +size 159038 diff --git a/python-hypercorn.changes b/python-hypercorn.changes new file mode 100644 index 0000000..d59c2b0 --- /dev/null +++ b/python-hypercorn.changes @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 25 11:08:52 UTC 2024 - Ben Greiner + +- Update requirements +- Skip Pythons <3.11 in order to avoid immature taskgroup backport + +------------------------------------------------------------------- +Fri Jan 12 23:06:27 UTC 2024 - vivid + +- Create package from upstream version 0.16.0 diff --git a/python-hypercorn.spec b/python-hypercorn.spec new file mode 100644 index 0000000..f15c008 --- /dev/null +++ b/python-hypercorn.spec @@ -0,0 +1,90 @@ +# +# spec file for package python-Hypercorn +# +# Copyright (c) 2024 SUSE LLC +# +# 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 https://bugs.opensuse.org/ +# + + +# avoid taskgroup backports +%define skip_python39 1 +%define skip_python310 1 +Name: python-hypercorn +Version: 0.16.0 +Release: 0 +Summary: A ASGI Server based on Hyper libraries and inspired by Gunicorn +License: MIT +URL: https://github.com/pgjones/hypercorn/ +Source: https://github.com/pgjones/hypercorn/archive/refs/tags/%{version}.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module poetry-core >= 1} +BuildRequires: %{python_module exceptiongroup >= 1.1.0} +BuildRequires: %{python_module h11} +BuildRequires: %{python_module h2 >= 3.1.0} +BuildRequires: %{python_module hypothesis} +BuildRequires: %{python_module priority} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytest-asyncio} +BuildRequires: %{python_module pytest-trio} +BuildRequires: %{python_module trio >= 0.22.0} +BuildRequires: %{python_module wsproto >= 0.14.0} +BuildRequires: fdupes +Requires: python-exceptiongroup >= 1.1.0 +Requires: python-h11 +Requires: python-h2 >= 3.1.0 +Requires: python-priority +Requires: python-wsproto >= 0.14.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages + +%description +Hypercorn is an `ASGI and WSGI web server based on the sans-io hyper, h11, h2, +and wsproto libraries and inspired by Gunicorn. Hypercorn supports HTTP/1, +HTTP/2, WebSockets (over HTTP/1 and HTTP/2), ASGI, and WSGI specifications. +Hypercorn can utilise asyncio, uvloop, or trio worker types. + +%prep +%autosetup -p1 -n hypercorn-%{version} +sed -i 's/--no-cov-on-fail//' pyproject.toml + +%build +%pyproject_wheel + +%check +%pytest + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}/%{$python_sitelib} +%python_clone -a %{buildroot}/%{_bindir}/hypercorn +%python_expand chmod -x %{buildroot}/%{$python_sitelib}/hypercorn/protocol/__init__.py +%python_expand chmod -x %{buildroot}/%{$python_sitelib}/hypercorn/protocol/h11.py +%python_expand chmod -x %{buildroot}/%{$python_sitelib}/hypercorn/protocol/h2.py + +%files %{python_files} +%{python_sitelib}/hypercorn +%{python_sitelib}/hypercorn-%{version}.dist-info +%python_alternative %{_bindir}/hypercorn + +%post +%python_install_alternative hypercorn + +%postun +%python_uninstall_alternative hypercorn + + +%changelog