Update to 1.9.0

This commit is contained in:
baizg1107 2020-12-09 16:22:31 +08:00
parent 973993fb20
commit 4b3ebf45c2
3 changed files with 53 additions and 72 deletions

Binary file not shown.

BIN
py-1.9.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,24 +1,13 @@
%bcond_with tests %global _empty_manifest_terminate_build 0
Name: python-py
%global with_help 1 Version: 1.9.0
%global modname py Release: 1
%global modnameversion %{modname}-%{version} Summary: library with cross-python path, ini-parsing, io, code, log facilities
%global p2builddir python2tmp License: MIT license
%global p3builddir python3tmp URL: https://py.readthedocs.io/
Source0: https://files.pythonhosted.org/packages/97/a6/ab9183fe08f69a53d06ac0ee8432bc0ffbb3989c575cc69b73a0229a9a99/py-1.9.0.tar.gz
Name: python-%{modname}
Version: 1.5.4
Release: 5
Summary: Library with cross-python path, ini-parsing, io, code, log facilities
License: MIT and Public Domain
URL: http://pylib.readthedocs.io/en/stable/
Source: https://files.pythonhosted.org/packages/source/p/%{modname}/%{modnameversion}.tar.gz
BuildArch: noarch BuildArch: noarch
%if %{with tests}
BuildRequires: subversion
%endif
%global _description \ %global _description \
The py lib is a Python development support library featuring the\ The py lib is a Python development support library featuring the\
following tools and modules:\ following tools and modules:\
@ -31,73 +20,65 @@ following tools and modules:\
%description %description
%{_description} %{_description}
%package -n python3-%{modname} %package -n python3-py
Summary: %{summary} Summary: library with cross-python path, ini-parsing, io, code, log facilities
BuildRequires: python3-devel python3-setuptools python3-setuptools_scm Provides: python-py
%if 0%{?with_help} BuildRequires: python3-devel
BuildRequires: %{_bindir}/sphinx-build-3 BuildRequires: python3-setuptools
%endif BuildRequires: python3-setuptools_scm
%if %{with tests} %description -n python3-py
BuildRequires: python3-pytest >= 2.9.0, python3-pytest < 2.10
%endif
Requires: python3-setuptools
%{?python_provide:%python_provide python3-%{modname}}
Provides: bundled(python3-apipkg) = 1.4 bundled(python3-iniconfig) = 1.0.0
Obsoletes: platform-python-%{modname} < %{version}-%{release}
%description -n python3-%{modname}
%{_description} %{_description}
%package help
%if 0%{?with_help} Summary: Development documents and examples for py
%package_help Provides: python3-py-doc
%endif %description help
%{_description}
%prep %prep
%autosetup -c -n %{modnameversion} %autosetup -n py-1.9.0
find %{modnameversion} \
-type f -a \( -name '*.py' -o -name 'py.*' \) \
-exec sed -i '1{/^#!/d}' {} \; \
-exec chmod u=rw,go=r {} \;
mv %{modnameversion} %{p3builddir}
%build %build
pushd %{p3builddir}
%py3_build %py3_build
%if 0%{?with_help}
make -C doc html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-3
%endif
popd
%install %install
pushd %{p3builddir}
%py3_install %py3_install
rm -rf doc/_build/html/.buildinfo 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 popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%check %files -n python3-py -f filelist.lst
%if %{with tests} %dir %{python3_sitelib}/*
pushd %{p3builddir}
PYTHONPATH=%{buildroot}%{python3_sitelib} LC_ALL="en_US.UTF-8" \
py.test-%{python3_version} -r s -k"-TestWCSvnCommandPath" testing
popd
%endif
%files -n python3-%{modname} %files help -f doclist.lst
%license %{p3builddir}/LICENSE %{_pkgdocdir}
%{python3_sitelib}/py-*.egg-info/
%{python3_sitelib}/py/
%if 0%{?with_help}
%files help
%doc %{p3builddir}/CHANGELOG
%doc %{p3builddir}/README.rst
%doc %{p3builddir}/doc/_build/html
%endif
%changelog %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 * Mon Aug 10 202 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.5.4-5
- Remove python2 - Remove python2