1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# bidict -- bidirectional mapping library for Python
#
# Build backend is uv_build (PEP 517). Upstream pins it in
# [build-system] requires as "uv_build>=0.8.13,<0.12", so BuildRequires carries
# the matching RPM python3-uv-build, which ships both the /usr/bin/uv-build
# binary and the importable uv_build Python shim that pip loads as the backend.
#
# The build macros used in the build and install sections come from
# openEuler-rpm-config (not Fedora's pyproject-rpm-macros). They are a matched
# pair that both operate on the ./build wheel directory:
# pypi-build hook = python3 -m pip wheel --use-pep517 --no-build-isolation
# --no-deps --wheel-dir ./build .
# pypi-install hook= python3 -m pip install --root BUILDROOT --no-index
# --find-links ./build NAME==VERSION
#
# Tests need pytest, hypothesis, pytest-benchmark, pytest-xdist,
# sortedcontainers, pytest-sphinx and a Sphinx doctest setup (the upstream test
# dependency group). None of those are available in the target chroot, so the
# check section is intentionally omitted rather than replaced with a token
# smoke test.
%global pypi_name bidict
Name: python-%{pypi_name}
Version: 0.24.1
Release: 1%{?dist}
Summary: The bidirectional mapping library for Python
License: MPL-2.0
URL: https://github.com/jab/bidict
Source0: https://github.com/jab/bidict/archive/refs/tags/v%{version}/%{pypi_name}-%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-wheel
BuildRequires: python3-uv-build >= 0.8.13
%description
bidict provides a bidirectional mapping data structure for Python, i.e. a
one-to-one mapping in which the keys and values are symmetric: the inverse
mapping is always available, and looking up a key by its value (or a value by
its key) is equally efficient.
It ships a dependency-free implementation, plus drop-in compatible subclasses
covering the built-in dict and collections.abc.Mapping semantics.
%package -n python3-%{pypi_name}
Summary: %{summary}
Provides: python-%{pypi_name} = %{version}-%{release}
Requires: python3-typing-extensions
%description -n python3-%{pypi_name}
bidict provides a bidirectional mapping data structure for Python, i.e. a
one-to-one mapping in which the keys and values are symmetric: the inverse
mapping is always available, and looking up a key by its value (or a value by
its key) is equally efficient.
This package provides the module for Python 3.
%prep
# Source tarball top level directory: python-bidict-0.24.1
%autosetup -n %{name}-%{version}
%build
%pyproject_build
%install
%pyproject_install
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst CHANGELOG.rst
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/
%changelog
* Tue Sep 22 2026 Python_Bot <Python_Bot@openeuler.org> - 0.24.1-1
- Initial package
|