summaryrefslogtreecommitdiff
path: root/sniffio.spec
diff options
context:
space:
mode:
Diffstat (limited to 'sniffio.spec')
-rw-r--r--sniffio.spec81
1 files changed, 81 insertions, 0 deletions
diff --git a/sniffio.spec b/sniffio.spec
new file mode 100644
index 0000000..8cbc60e
--- /dev/null
+++ b/sniffio.spec
@@ -0,0 +1,81 @@
+# Build system: setuptools.build_meta via pyproject.toml (no setup.py in source)
+# topdir after --transform: sniffio-1.3.1
+%global pypi_name sniffio
+
+Name: python-%{pypi_name}
+Version: 1.3.1
+Release: 1%{?dist}
+Summary: Sniff out which async library your code is running under
+License: MIT OR Apache-2.0
+URL: https://github.com/python-trio/sniffio
+Source0: https://github.com/python-trio/sniffio/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
+BuildArch: noarch
+
+%description
+Sniff out which async library your code is running under by examining the
+runtime environment. This small utility detects whether the code is currently
+running under asyncio, trio, or curio, which is useful for writing library
+code that needs to support multiple async backends.
+
+
+%package -n python3-%{pypi_name}
+Summary: Sniff out which async library your code is running under
+Provides: python-%{pypi_name}
+Provides: python3dist(%{pypi_name}) = %{version}
+Provides: python3-%{pypi_name} = %{version}-%{release}
+BuildRequires: python3-devel
+BuildRequires: python3-pip
+BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools-scm >= 6.4
+
+%description -n python3-%{pypi_name}
+Sniff out which async library your code is running under by examining the
+runtime environment. This small utility detects whether the code is currently
+running under asyncio, trio, or curio, which is useful for writing library
+code that needs to support multiple async backends.
+
+
+%package help
+Summary: Development documents and examples for %{pypi_name}
+Provides: python3-%{pypi_name}-doc
+BuildArch: noarch
+Requires: python3-%{pypi_name}
+
+%description help
+Sniff out which async library your code is running under by examining the
+runtime environment. This small utility detects whether the code is currently
+running under asyncio, trio, or curio, which is useful for writing library
+code that needs to support multiple async backends.
+
+
+%prep
+%autosetup -n %{pypi_name}-%{version} -p1
+
+
+%build
+pip3 wheel --no-build-isolation --no-deps --wheel-dir %{_builddir}/wheels .
+
+%install
+pip3 install --no-build-isolation --no-index \
+ --find-links %{_builddir}/wheels \
+ --root %{buildroot} --prefix /usr \
+ %{pypi_name}==%{version}
+
+
+%files -n python3-%{pypi_name}
+%license LICENSE
+%license LICENSE.MIT
+%license LICENSE.APACHE2
+%{python3_sitelib}/sniffio/
+%{python3_sitelib}/sniffio-%{version}*.dist-info/
+
+%files help
+%doc README.rst
+%license LICENSE
+%license LICENSE.MIT
+%license LICENSE.APACHE2
+
+
+%changelog
+* Mon Oct 26 2026 Python_Bot <Python_Bot@openeuler.org> - 1.3.1-1
+- Initial package