summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-04-15 20:01:03 +0000
committerCoprDistGit <infra@openeuler.org>2024-04-15 20:01:03 +0000
commitca46fba53a3df6923fed4e22ec5cef8c445619e3 (patch)
tree869cbf0ba448a7c509d87d2fb1c8e368563519f0
parent58a11aaa727796c8ffe916bac888ff8be663a626 (diff)
automatic import of python-pyro-pplopeneuler23.09
-rw-r--r--python-pyro-ppl.spec57
1 files changed, 41 insertions, 16 deletions
diff --git a/python-pyro-ppl.spec b/python-pyro-ppl.spec
index d3fcbe2..9322b0b 100644
--- a/python-pyro-ppl.spec
+++ b/python-pyro-ppl.spec
@@ -1,12 +1,12 @@
-%global pypi_name pyro-ppl
-%global pypi_version 1.8.4
+%global pkg_name pyro-ppl
+%global pkg_version 1.8.4
%global pkg_summary A Python library for probabilistic modeling and inference
%global pkg_description %{expand:
%{pkg_summary}}
-%global debug_package %{nil}
+%global _empty_manifest_terminate_build 0
-Name: python-%{pypi_name}
-Version: %{pypi_version}
+Name: python-%{pkg_name}
+Version: %{pkg_version}
Release: 1
Summary: %{pkg_summary}
@@ -14,13 +14,13 @@ License: Apache 2.0
URL: https://github.com/pyro-ppl/pyro
Source0: https://files.pythonhosted.org/packages/c0/af/f653e545519597d6c833136e88aae5d8bb81969cf83c6f3d2c34f0269456/pyro-ppl-1.8.4.tar.gz
-BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-BuildRequires: python3-setuptools_scm
-BuildRequires: python3-pbr
-BuildRequires: python3-pip
-BuildRequires: python3-wheel
-BuildRequires: python3-hatchling
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_scm
+BuildRequires: python3-pbr
+BuildRequires: python3-pip
+BuildRequires: python3-wheel
+BuildRequires: python3-hatchling
BuildRequires: python3-numpy
BuildRequires: python3-pytorch >= 2.1.2
@@ -28,26 +28,51 @@ BuildRequires: python3-pytorch >= 2.1.2
%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 help
+Summary: the documents and examples for %{pkg_name}
+
+%description help
+This package contains the documents and examples for %{pkg_name}
+
%prep
-%autosetup -p1 -n %{pypi_name}-%{pypi_version}
+%autosetup -p1 -n %{pkg_name}-%{pkg_version}
%build
%pyproject_build
%install
%pyproject_install
+# help pkg files:
+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.md
%doc README.md
%{python3_sitelib}/pyro*
+%files help -f doclist.lst
+%{_docdir}/*
+
%changelog
+* Mon Apr 15 2024 YunShu
+- add help subpackage
+
* Sun Mar 31 2024 YunShu
- add pyro-ppl 1.8.4