# attrdict3: a dict with attribute-style access (the maintained fork of AttrDict that works on Python >= 3.10). A dependency of tirl, which # FMRIB's FSL installer ships; not in Fedora. %global pypi_name attrdict3 Name: python-%{pypi_name} Version: 2.0.2 Release: 1%{?dist} Summary: A dict with attribute-style access License: MIT URL: https://github.com/pirofti/AttrDict3 Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: AttrDict is a mapping that allows its elements to be accessed both as keys and as attributes (d.key and d['key']), recursively for nested mappings and sequences. attrdict3 is the fork that keeps it working on current Python 3.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files attrdict %check %pyproject_check_import # the sdist ships no tests, so exercise the behaviour tirl relies on PYTHONPATH=%{buildroot}%{python3_sitelib} %{python3} - <<'PY' from attrdict import AttrDict, AttrMap, AttrDefault d = AttrDict({'a': 1, 'b': {'c': [{'d': 2}]}}) assert d.a == 1 and d['a'] == 1 assert d.b.c[0].d == 2, "nested mappings inside sequences are converted" d.e = 5; assert d['e'] == 5, "attribute assignment writes the key" assert (d + {'f': 6}).f == 6 and (d + {'a': 9}).a == 9, "addition merges, right side wins" try: d.missing; raise SystemExit("missing attribute did not raise") except AttributeError: pass assert AttrDefault(int, {}).x == 0, "default factory" assert dict(AttrMap({'k': 1})) == {'k': 1} PY %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE.txt %doc README.rst CHANGES.txt %changelog * Fri Oct 09 2026 Morgan Hough - 2.0.2-1 - Initial package: attrdict3 2.0.2, needed by tirl (shipped by FMRIB's FSL installer, not in Fedora). The module is `attrdict`; no Fedora package provides that name. The sdist has no tests, so %%check exercises attribute access, nested conversion, addition/merge, defaults and AttributeError.