summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-04-15 16:04:23 +0000
committerCoprDistGit <infra@openeuler.org>2024-04-15 16:04:23 +0000
commit7c2e8f949b9d009a58a5d96c901604c8ad8343a3 (patch)
treeab2589734f03b927212c79ca7dd39f47cd73ba61
parent3d5e78c7a94cc39fe65c6b1c832bc81d85b85fab (diff)
automatic import of torchvision
-rw-r--r--.gitignore1
-rw-r--r--sources2
-rw-r--r--torchvision.spec67
-rw-r--r--tst.patch13
-rw-r--r--vision.spec56
5 files changed, 58 insertions, 81 deletions
diff --git a/.gitignore b/.gitignore
index a13880f..229bc2e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/v0.16.2.tar.gz
+/v0.17.2.tar.gz
diff --git a/sources b/sources
index 75641de..695ece4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a0e7f9cc2aa638576fd8088813377294 v0.16.2.tar.gz
+73e4905cd63ecc614fc6abf2d0a1d171 v0.17.2.tar.gz
diff --git a/torchvision.spec b/torchvision.spec
deleted file mode 100644
index 13b6940..0000000
--- a/torchvision.spec
+++ /dev/null
@@ -1,67 +0,0 @@
-Summary: The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.
-Name: torchvision
-Version: 0.16.2
-Release: 1
-License: BSD
-Group: Development/Libraries
-Source0: https://github.com/pytorch/vision/archive/refs/tags/v0.16.2.tar.gz
-URL: https://github.com/pytorch/vision
-BuildRoot: %{_tmppath}/%{name}-buildroot
-Patch0: tst.patch
-
-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
-BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-BuildRequires: python3-setuptools_scm
-BuildRequires: python3-pbr
-BuildRequires: python3-wheel
-BuildRequires: python3-hatchling
-BuildRequires: ffmpeg ffmpeg-devel ffmpeg-libs
-BuildRequires: ninja-build
-BuildRequires: numactl
-BuildRequires: cmake
-
-%description -n python3-torchvision
-Torchvision is a PyTorch add-on that provides access to:
-- Datasets (MNIST, CIFAR10, etc.)
-- Models (ResNet, VGG, etc.)
-- Transforms (for image preprocessing)
-
-%global pypi_version 0.16.2
-
-%prep
-%autosetup -p1 -n vision-%{pypi_version}
-%patch0 -p1
-
-%build
-%pyproject_build
-
-%install
-%pyproject_install
-
-%files
-%doc *.md
-%license LICENSE
-%{python3_sitearch}/*
-
-%changelog
-* Mon Apr 15 2024 weilaijishu
-- Initial package
diff --git a/tst.patch b/tst.patch
deleted file mode 100644
index 7770526..0000000
--- a/tst.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/setup.py b/setup.py
-index ce67413..6b376c2 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
diff --git a/vision.spec b/vision.spec
new file mode 100644
index 0000000..c596e29
--- /dev/null
+++ b/vision.spec
@@ -0,0 +1,56 @@
+%global _empty_manifest_terminate_build 0
+%global _unpackaged_files_terminate_build 0
+%global pypi_name torchvision
+
+Name: %{pypi_name}
+Version: 0.17.2
+Release: 1%{?dist}
+Summary: %{name} is a torch ecosystem tools
+
+License: BSD-3
+URL: https://pytorch.org/vision
+Source0: https://github.com/pytorch/vision/archive/refs/tags/v%{version}.tar.gz
+
+
+%description
+datasets and models for the pytorch paper
+
+
+# pkg 1
+%package -n python3-%{name}
+Summary: a model and datasets for pytorch
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pytorch
+Requires: python3-requests
+
+%description -n python3-%{pypi_name}
+datasets and models for the pytorch paper
+
+# pkg 2
+%package -n python3-%{pypi_name}-doc
+Summary: doc for the %{name} lib.
+
+%description -n python3-%{pypi_name}-doc
+description for helping using the torchvision lib
+
+%prep
+%autosetup -p1 -n vision-%{version}
+rm -rf %{pypi_name}.egg-info
+
+
+%build
+%py3_build
+
+%install
+%py3_install
+
+%files -n python3-%{pypi_name}
+%doc *.md
+%license LICENSE
+#%{python3_sitelib}/%{pypi_name}
+%{python3_sitearch}/%{name}
+
+%changelog
+* Sun Mar 31 2024 Super User
+- pkg init