diff options
author | CoprDistGit <infra@openeuler.org> | 2023-03-09 17:48:34 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-03-09 17:48:34 +0000 |
commit | 932dc7642feda7ff3f9f9072185fb9b8154fc19d (patch) | |
tree | 565986f2d41a1e5bccabf6e5f3e99c8b59b79169 | |
parent | 4f57afe303014052b512d06792138665a1faceaa (diff) |
automatic import of python-uptime
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-uptime.spec | 75 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 77 insertions, 0 deletions
@@ -0,0 +1 @@ +/uptime-3.0.1.tar.gz diff --git a/python-uptime.spec b/python-uptime.spec new file mode 100644 index 0000000..ce8c4f3 --- /dev/null +++ b/python-uptime.spec @@ -0,0 +1,75 @@ +%global _empty_manifest_terminate_build 0 +Name: python-uptime +Version: 3.0.1 +Release: 1 +Summary: Cross-platform uptime library +License: UNKNOWN +URL: https://github.com/Cairnarvon/uptime +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ad/53/6c420ddf6949097d6f9406358951c9322505849bea9cb79efe3acc0bb55d/uptime-3.0.1.tar.gz +BuildArch: noarch + + +%description +This module provides a cross-platform way to retrieve system uptime and boot time. +See documentation for a full list of supported platforms (yours is likely one of them). + +%package -n python3-uptime +Summary: Cross-platform uptime library +Provides: python-uptime +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-uptime +This module provides a cross-platform way to retrieve system uptime and boot time. +See documentation for a full list of supported platforms (yours is likely one of them). + +%package help +Summary: Development documents and examples for uptime +Provides: python3-uptime-doc +%description help +This module provides a cross-platform way to retrieve system uptime and boot time. +See documentation for a full list of supported platforms (yours is likely one of them). + +%prep +%autosetup -n uptime-3.0.1 + +%build +%py3_build + +%install +%py3_install +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} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +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}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-uptime -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 3.0.1-1 +- Package Spec generated @@ -0,0 +1 @@ +046063e97abbee37bf8de3fd16df674d uptime-3.0.1.tar.gz |