%if %{defined el7} %global __pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires # EPEL 7 does not have a %%pytest macro :(. # This is a simplified version of Fedora's that only has what we need. %global pytest %{expand:\\\ PYTHONPATH="$%{buildroot}%{python3_sitelib}"\\\ PYTHONDONTWRITEBYTECODE=1\\\ %{_bindir}/pytest-%{python3_version}} %endif Name: python-tomli-w Version: 0.4.0 Release: 4%{?dist} Summary: A Python library for writing TOML License: MIT URL: https://github.com/hukkin/tomli-w Source0: %{url}/archive/%{version}/tomli-w-%{version}.tar.gz # RHEL 8's pytest is too old and does not support the tmp_path filter. Patch1: 0001-tests-Replace-tmp_path-with-tmpdir-pytest-fixture.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-flit-core BuildRequires: python3-pytest %global _description %{expand: Tomli-W is a Python library for writing TOML. It is a write-only counterpart to Tomli, which is a read-only TOML parser. Tomli-W is fully compatible with TOML v1.0.0.} %description %_description %package -n python3-tomli-w Summary: %{summary} %description -n python3-tomli-w %_description %prep %autosetup -p1 -n tomli-w-%{version} %build %{python3} -m flit_core.wheel %install %py3_install_wheel tomli_w-%{version}-py3-none-any.whl %check %pytest %files -n python3-tomli-w %doc README.md %doc CHANGELOG.md %license LICENSE %{python3_sitelib}/tomli_w/ %{python3_sitelib}/tomli_w-%{version}.dist-info/ %changelog * Sat Oct 15 2022 Miro HronĨok - 0.4.0-4 - Initial package for EPEL 8 - Fixes: rhbz#2135038