## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name torchdata %bcond_with gitcommit %if %{with gitcommit} %global pypi_version 0.7.1 # Fixes are still happening in after 0.7.1 # ex/ # commit 07903385443da2cab8ed90c46bd4e02412945100 # Author: Danylo Baibak # Date: Fri Jan 26 01:12:03 2024 -0800 # # Forward fix / Update dill_available API for torchdata (#1222) # # Since torchtext depends on torchdata that depends on torch.. # we need to use the commit %global commit0 66f0b984d4c3b2f7d715d8eb4e4cac5101bf7f08 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global date0 20240327 %else %global pypi_version 0.11.0 %endif %bcond_with test Name: python-%{pypi_name} %if %{with gitcommit} Version: %{pypi_version}^git%{date0}.%{shortcommit0} %else Version: %{pypi_version} %endif Release: %autorelease Summary: A PyTorch module for data loading License: BSD-3-Clause URL: https://github.com/pytorch/data %if %{with gitcommit} Source0: %{url}/archive/%{commit0}/data-%{shortcommit0}.tar.gz %else Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/data-%{version}.tar.gz %endif # Do not use git submodules # Do not use distutils # Patch0: 0001-Prepare-torchdata-setup-for-fedora.patch # Limit to these because that is what torch is on ExclusiveArch: x86_64 aarch64 BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pip) BuildRequires: python3dist(pytest) BuildRequires: python3dist(pyyaml) BuildRequires: python3dist(requests) BuildRequires: python3dist(setuptools) BuildRequires: python3dist(torch) BuildRequires: python3dist(urllib3) %description torchdata is a library of common modular data loading primitives for easily constructing data pipelines. %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} torchdata is a library of common modular data loading primitives for easily constructing data pipelines. %prep %if %{with gitcommit} %autosetup -p1 -n data-%{commit0} %else %autosetup -p1 -n data-%{version} %endif rm -rf third_party/* %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %check %pyproject_check_import # Testing has a circular dependency # E ModuleNotFoundError: No module named 'torchtext' # We need torchdata to build torchtext :( %if %{with test} %pytest %endif %install %pyproject_install %pyproject_save_files %{pypi_name} %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %changelog ## START: Generated by rpmautospec * Fri Jul 25 2025 Tom Rix - 0.11.0-1 - Update to 0.11.0 * Fri Jul 25 2025 Tom Rix - 0.8.0-4 - Use pyproject macros * Fri Jul 25 2025 Fedora Release Engineering - 0.8.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Sat Jan 18 2025 Fedora Release Engineering - 0.8.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Thu Sep 12 2024 Tom Rix - 0.8.0-1 - Update to 0.8.0 * Fri Jul 19 2024 Fedora Release Engineering - 0.7.1^git20240327.66f0b98-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sun Jun 23 2024 Python Maint - 0.7.1^git20240327.66f0b98-2 - Rebuilt for Python 3.13 * Wed Mar 27 2024 Tom Rix - 0.7.1^git20240327.66f0b98-1 - Update to TOT * Wed Mar 27 2024 Tom Rix - 0.7.0-4 - Rebuild for torch 2.3 * Fri Jan 26 2024 Fedora Release Engineering - 0.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Dec 16 2023 Tom Rix - 0.7.0-1 - Initial package ## END: Generated by rpmautospec