- updated the requirement for examples and converters
OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/python-torch?expand=0&rev=6
This commit is contained in:
parent
10e2e125b6
commit
3756bcc792
@ -4,6 +4,11 @@ Tue Jan 14 13:01:33 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
- Requires python-PeachPy on x86_64 only, as it is optional
|
||||
and available on x86_64 only
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 8 10:47:18 UTC 2020 - Christian Goll <cgoll@suse.com>
|
||||
|
||||
- updated the requirement for examples and converters
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 12 11:17:34 UTC 2019 - Christian Goll <cgoll@suse.com>
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#
|
||||
%define srcname pytorch
|
||||
%define skip_python2 1
|
||||
%define pname torch
|
||||
|
||||
Name: python-torch
|
||||
Version: 1.1.0
|
||||
@ -94,8 +95,8 @@ Requires: python-future
|
||||
Requires: python-numpy
|
||||
Requires: python-leveldb
|
||||
|
||||
Provides: %{python_module caffe2 = %version}
|
||||
Provides: %{python_module pytorch = %version}
|
||||
Provides: python-caffe2 = %version
|
||||
Provides: python-pytorch = %version
|
||||
|
||||
%python_subpackages
|
||||
|
||||
@ -118,19 +119,26 @@ Although the Python interface is more polished and the primary focus of
|
||||
development, PyTorch also has a C++ frontend. This package contains the header
|
||||
to access the C/C++ interface.
|
||||
|
||||
%package -n %{name}-converters
|
||||
%package -n pytorch-converters
|
||||
Summary: Converters for onnx and caffe2
|
||||
Group: Development/Languages/Python
|
||||
BuildArch: noarch
|
||||
Requires: python3-pip
|
||||
Requires: python3-onnx
|
||||
Requires: python3-click
|
||||
Requires: python3-pname
|
||||
|
||||
%description -n %{name}-converters
|
||||
%description -n pytorch-converters
|
||||
Converter from caffe2 to onnx and from caffe2 to onnx formated files.
|
||||
|
||||
%package -n %{name}-examples
|
||||
%package -n pytorch-examples
|
||||
Summary: Examples which can be used for testing
|
||||
Group: Development/Languages/Python
|
||||
BuildArch: noarch
|
||||
Recommends: python3-lmdb
|
||||
Recommends: python3-networkx
|
||||
|
||||
%description -n %{name}-examples
|
||||
%description -n pytorch-examples
|
||||
This example files can be used to start an own pytorch/caffe2 project.
|
||||
|
||||
%package -n libtorch
|
||||
@ -182,7 +190,7 @@ export MAX_JOBS=%{?jobs}
|
||||
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
install -m 644 -D caffe2/python/examples/* -t %{buildroot}%{_docdir}/%{name}/
|
||||
install -m 755 -D caffe2/python/examples/* -t %{buildroot}%{_docdir}/%{name}/
|
||||
install -m 644 -D %{buildroot}%{python_sitearch}/torch/lib/* %{buildroot}/%{_libdir}
|
||||
rm -r %{buildroot}%{python_sitearch}/torch/lib
|
||||
cd %{buildroot}/%{_libdir}
|
||||
@ -190,7 +198,7 @@ rm libtorch.so
|
||||
ln -s libtorch.so.1 libtorch.so
|
||||
cd -
|
||||
for file in $(find %{buildroot}%{python_sitearch} -type f -name \*.py -perm 644 -size +1b); do
|
||||
%{__grep} '/bin/env ' $file && sed -i 's@/bin/env python@/bin/python@' $file && chmod 755 $file
|
||||
%{__grep} '/usr/bin/env ' $file && sed -i 's@/usr/bin/env python@/usr/bin/python@' $file && chmod 755 $file
|
||||
done
|
||||
|
||||
%check
|
||||
@ -230,11 +238,11 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
|
||||
%{python_sitearch}/torch/include/torch/csrc
|
||||
%{python_sitearch}/torch/include/torch/*.h
|
||||
|
||||
%files -n %{name}-converters
|
||||
%files -n pytorch-converters
|
||||
%{_bindir}/convert-caffe2-to-onnx
|
||||
%{_bindir}/convert-onnx-to-caffe2
|
||||
|
||||
%files -n %{name}-examples
|
||||
%files -n pytorch-examples
|
||||
%{_docdir}/%{name}
|
||||
|
||||
%files -n libtorch
|
||||
|
Loading…
Reference in New Issue
Block a user