summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-10-23 11:13:09 +0000
committerCoprDistGit <infra@openeuler.org>2026-10-23 11:13:09 +0000
commite484b7af324653e331cb9d0c07726820de7d1ce6 (patch)
tree769e7c45334c0f8c49dea6d87aed0abd206422d3
parentf0804efb2bc1d2a9cfbb9d2e129371a7c2bda9b8 (diff)
automatic import of python-sniffio
-rw-r--r--.gitignore1
-rw-r--r--sniffio.spec74
-rw-r--r--sources1
3 files changed, 76 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..8eab8f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/sniffio-1.3.1.tar.gz
diff --git a/sniffio.spec b/sniffio.spec
new file mode 100644
index 0000000..0b3a939
--- /dev/null
+++ b/sniffio.spec
@@ -0,0 +1,74 @@
+%global pypi_name sniffio
+
+# 纯 Python 包,build-backend = setuptools.build_meta,无 setup.py
+# 采用方案 pip(pip wheel + pip install,全平台兼容)
+# 版本来源:pyproject.toml [tool.setuptools.dynamic] version = {attr = "sniffio._version.__version__"}
+# _version.py 已硬编码 __version__ = "1.3.1",不依赖 git history / setuptools_scm 推断
+
+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}/%{pypi_name}-%{version}.tar.gz
+BuildArch: noarch
+
+%description
+sniffio is a tiny package whose only purpose is to let you detect which
+async library your code is running under. It supports Trio and asyncio,
+and can be extended to support other async I/O libraries.
+
+
+%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}
+BuildRequires: python3-devel
+BuildRequires: python3-pip
+BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_scm
+
+%description -n python3-%{pypi_name}
+sniffio is a tiny package whose only purpose is to let you detect which
+async library your code is running under. It supports Trio and asyncio,
+and can be extended to support other async I/O libraries.
+
+
+%package help
+Summary: Development documents and examples for %{pypi_name}
+Provides: python3-%{pypi_name}-doc
+
+%description help
+Development documents and examples for sniffio.
+
+
+%prep
+%autosetup -n %{pypi_name}-%{version} -p1
+
+
+%build
+# 方案 pip:用 pip3 wheel 构建(--no-build-isolation 使用系统已装的构建依赖)
+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.MIT LICENSE.APACHE2
+%doc README.rst
+%{python3_sitelib}/%{pypi_name}/
+%{python3_sitelib}/%{pypi_name}-%{version}*.dist-info/
+
+%files help
+%doc README.rst CHEATSHEET.rst
+
+
+%changelog
+* Fri Oct 23 2026 Python_Bot <Python_Bot@openeuler.org> - 1.3.1-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..5742393
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+7159969d30e0126aaab6f0956534b0a9 sniffio-1.3.1.tar.gz