summaryrefslogtreecommitdiff
path: root/python-torchvision.spec
blob: 384c54be9e734edea0fe8997efaa7a09cffe9f1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%global pypi_name torchvision
%global pypi_version 0.16.2
%global pypi_summary Datasets, Transforms and Models specific to Computer Vision
%global pypi_description %{pypi_summary}
%global debug_package %{nil}

Name:           python-%{pypi_name}
Version:        %{pypi_version}
Release:        1%{?dist}
Summary:        %{pypi_summary}

License:        BSD 3-Clause
URL:            https://github.com/pytorch/vision
Source0:        %{url}/archive/refs/tags/v%{version}.tar.gz#/vision-%{version}.tar.gz

Patch0:		    0001-fix-illegal-char.patch

BuildRequires: ninja-build
BuildRequires: ffmpeg-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: libpng-devel

BuildRequires: python3-devel
BuildRequires: python3-pytorch >= 2.1.2
BuildRequires: python3-numpy

%description
%{pypi_description}

%package -n     python3-%{pypi_name}
Summary:        %{pypi_summary}

%description -n python3-%{pypi_name}
%{pypi_description}

%prep
%autosetup -p1 -n vision-%{pypi_version}

%build
%pyproject_build

%install
%pyproject_install

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{python3_sitearch}/%{pypi_name}
%{python3_sitearch}/%{pypi_name}-*.egg-info/

%changelog
* Sun Mar 31 2024 YunShu
- add torchvision