summaryrefslogtreecommitdiff
path: root/python-pytorch3d.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-04-15 03:09:04 +0000
committerCoprDistGit <infra@openeuler.org>2024-04-15 03:09:04 +0000
commit4f6abeb50cb893c2ecace8f0d09fd9427d0fd4f0 (patch)
tree4c14bdc9bf414eddc44ae0336fbae00ebfccbf6f /python-pytorch3d.spec
parenta55593f65cbfeea105477db3c4739b285d4a52c2 (diff)
automatic import of python-pytorch3d
Diffstat (limited to 'python-pytorch3d.spec')
-rw-r--r--python-pytorch3d.spec79
1 files changed, 51 insertions, 28 deletions
diff --git a/python-pytorch3d.spec b/python-pytorch3d.spec
index b43cf87..d64236d 100644
--- a/python-pytorch3d.spec
+++ b/python-pytorch3d.spec
@@ -1,63 +1,86 @@
-%global pypi_name pytorch3d
-%global pypi_version 0.7.5
+%global pkg_name pytorch3d
+%global pkg_version 0.7.5
%global pkg_summary PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
%global pkg_description %{expand:
%{pkg_summary}}
-%global debug_package %{nil}
+%global _empty_manifest_terminate_build 0
-Name: python-%{pypi_name}
-Version: %{pypi_version}
-Release: 1%{?dist}
+Name: python-%{pkg_name}
+Version: %{pkg_version}
+Release: 1
Summary: %{pkg_summary}
License: BSD
URL: https://github.com/facebookresearch/pytorch3d
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/pytorch3d-%{version}.tar.gz
-BuildRequires: cmake
-# BuildRequires: ninja-build # 很奇怪,使用ninja会卡住
-BuildRequires: make
-BuildRequires: g++
+# 不能使用ninja,会卡住
+BuildRequires: cmake
+BuildRequires: make
+BuildRequires: g++
-BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-BuildRequires: python3-setuptools_scm
-BuildRequires: python3-pbr
-BuildRequires: python3-pip
-BuildRequires: python3-wheel
-BuildRequires: python3-hatchling
-
-BuildRequires: python3-pytorch >= 2.1.2
-BuildRequires: python3-fvcore
-BuildRequires: python3-iopath
-BuildRequires: python3-torchvision
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_scm
+BuildRequires: python3-pbr
+BuildRequires: python3-pip
+BuildRequires: python3-wheel
+BuildRequires: python3-hatchling
+BuildRequires: python3-pytorch >= 2.1.2
+BuildRequires: python3-fvcore
+BuildRequires: python3-iopath
+BuildRequires: python3-torchvision
%description
%{pkg_description}
-%package -n python3-%{pypi_name}
+%package -n python3-%{pkg_name}
Summary: %{pkg_summary}
-%description -n python3-%{pypi_name}
+%description -n python3-%{pkg_name}
%{pkg_description}
+%package doc
+Summary: the documentation for %{pkg_name}
+
+%description doc
+This package contains the documentation for %{pkg_name}
+
%prep
-%autosetup -p1 -n %{pypi_name}-%{pypi_version}
+%autosetup -p1 -n %{pkg_name}-%{pkg_version}
%build
%pyproject_build
%install
%pyproject_install
+# doc pkg:
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/doclist.lst .
-%files -n python3-%{pypi_name}
+%files -n python3-%{pkg_name}
%license LICENSE
%doc README.md
-%{python3_sitearch}/%{pypi_name}*
+%{python3_sitearch}/%{pkg_name}*
%{python3_sitearch}/projects/*
-%{_bindir}/%{pypi_name}*
+%{_bindir}/%{pkg_name}*
+
+%files doc -f doclist.lst
+%{_docdir}/*
%changelog
+* Mon Apr 15 2024 YunShu
+- add doc subpackage
* Sun Mar 31 2024 YunShu
- add pytorch3d