diff --git a/python-torch.changes b/python-torch.changes index d4e98b8..dceba58 100644 --- a/python-torch.changes +++ b/python-torch.changes @@ -4,6 +4,11 @@ Tue Jan 14 13:01:33 UTC 2020 - Guillaume GARDET - 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 + +- updated the requirement for examples and converters + ------------------------------------------------------------------- Wed Jun 12 11:17:34 UTC 2019 - Christian Goll diff --git a/python-torch.spec b/python-torch.spec index 6fb553d..e506c86 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -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