%global pypi_name iterable-io Name: python-%{pypi_name} Version: 1.0.0 Release: %autorelease -b 1 Summary: Adapt generators and other iterables to a file-like interface # Check if the automatically generated License and its spelling is correct for Fedora # https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ License: LGPL-3.0-only URL: https://github.com/pR0Ps/%{pypi_name} Source: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel # Fill in the actual package description to submit package to Fedora %global _description %{expand: iterable-io is a small Python library that provides an adapter so that it's possible to read from iterable objects in the same way as file-like objects. It is primarily useful as "glue" between two incompatible interfaces. As an example, in the case where one interface expects a file-like object to call .read() on, and the other only provides a generator of bytes. One way to solve this issue would be to write all the bytes in the generator to a temporary file, then provide that file instead, but if the generator produces a large amount of data then this is both slow to start, and resource-intensive. This library allows streaming data between these two incompatible interfaces so as data is requested by .read(), it's pulled from the iterable. This keeps resource usage low and removes the startup delay.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -p1 -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # For official Fedora packages, including files with '*' +auto is not allowed # Replace it with a list of relevant Python modules/globs and list extra files in %%files %pyproject_save_files '*' +auto %check %pyproject_check_import %files -n python3-%{pypi_name} -f %{pyproject_files} %changelog * Sat Jul 13 2024 Kyle Bloom - 1.0.0-1 - Initial package