python-py/python-py.spec
2020-12-09 16:22:31 +08:00

87 lines
2.4 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: python-py
Version: 1.9.0
Release: 1
Summary: library with cross-python path, ini-parsing, io, code, log facilities
License: MIT license
URL: https://py.readthedocs.io/
Source0: https://files.pythonhosted.org/packages/97/a6/ab9183fe08f69a53d06ac0ee8432bc0ffbb3989c575cc69b73a0229a9a99/py-1.9.0.tar.gz
BuildArch: noarch
%global _description \
The py lib is a Python development support library featuring the\
following tools and modules:\
\
* py.path: uniform local and svn path objects\
* py.apipkg: explicit API control and lazy-importing\
* py.iniconfig: easy parsing of .ini files\
* py.code: dynamic code generation and introspection
%description
%{_description}
%package -n python3-py
Summary: library with cross-python path, ini-parsing, io, code, log facilities
Provides: python-py
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
%description -n python3-py
%{_description}
%package help
Summary: Development documents and examples for py
Provides: python3-py-doc
%description help
%{_description}
%prep
%autosetup -n py-1.9.0
%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-py -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_pkgdocdir}
%changelog
* Wed Dec 09 2020 baizhonggui <baizhonggui@huawei.com> - 1.9.0-1
- Update to 1.9.0
* Mon Aug 10 202 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.5.4-5
- Remove python2
* Tue Dec 10 2019 mengxian <mengxian@huawei.com> - 1.5.4-4
- Package init