From a0305c67fa53e76cbcba89a2fbb68af5341feb1a Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 15 Apr 2024 15:17:06 +0000 Subject: automatic import of torchvision --- torchvision.spec | 22 ++++------------------ tst.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+), 18 deletions(-) create mode 100644 tst.patch diff --git a/torchvision.spec b/torchvision.spec index a5b74d6..b279a4e 100644 --- a/torchvision.spec +++ b/torchvision.spec @@ -4,26 +4,11 @@ Version: 0.16.2 Release: 1 License: BSD Group: Development/Libraries -Source: https://github.com/pytorch/vision/archive/refs/tags/v0.16.2.tar.gz +Source0: https://github.com/pytorch/vision/archive/refs/tags/v0.16.2.tar.gz +Source1: tst.patch URL: https://github.com/pytorch/vision BuildRoot: %{_tmppath}/%{name}-buildroot -Requires: python3-pytorch -Requires: python3-numpy -Requires: python3-pillow -Requires: python3-requests -Requires: python3-scipy -Requires: python3-sympy - -%description -Torchvision is a PyTorch add-on that provides access to: -- Datasets (MNIST, CIFAR10, etc.) -- Models (ResNet, VGG, etc.) -- Transforms (for image preprocessing) - -%package -n python3-torchvision -Summary: The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision. -Provides: python-torchvision BuildRequires: python3-pytorch BuildRequires: python3-requests BuildRequires: python3-pip @@ -38,7 +23,7 @@ BuildRequires: ninja-build BuildRequires: numactl BuildRequires: cmake -%description -n python3-torchvision +%description Torchvision is a PyTorch add-on that provides access to: - Datasets (MNIST, CIFAR10, etc.) - Models (ResNet, VGG, etc.) @@ -48,6 +33,7 @@ Torchvision is a PyTorch add-on that provides access to: %prep %autosetup -p1 -n vision-%{pypi_version} +patch -p1 < %{SOURCE1} %build %pyproject_build diff --git a/tst.patch b/tst.patch new file mode 100644 index 0000000..dab7141 --- /dev/null +++ b/tst.patch @@ -0,0 +1,13 @@ +diff --git a/setup.py b/setup.py +index ce67413f41..7632e8a13d 100644 +--- a/setup.py ++++ b/setup.py +@@ -64,7 +64,7 @@ requirements = [ + ] + + # Excluding 8.3.* because of https://github.com/pytorch/vision/issues/4934 +-pillow_ver = " >= 5.3.0, !=8.3.*" ++pillow_ver = " >= 5.3.0, !=8.3.1, !=8.3.2, !=8.3.3" + pillow_req = "pillow-simd" if get_dist("pillow-simd") is not None else "pillow" + requirements.append(pillow_req + pillow_ver) + \ No newline at end of file -- cgit v1.2.3