From: @small_leek Reviewed-by: @ruebb Signed-off-by: @ruebb
This commit is contained in:
commit
f5d344a780
BIN
py-1.5.4.tar.gz
Normal file
BIN
py-1.5.4.tar.gz
Normal file
Binary file not shown.
BIN
py-1.9.0.tar.gz
BIN
py-1.9.0.tar.gz
Binary file not shown.
125
python-py.spec
125
python-py.spec
@ -1,12 +1,23 @@
|
|||||||
%global _empty_manifest_terminate_build 0
|
%bcond_with tests
|
||||||
Name: python-py
|
|
||||||
Version: 1.9.0
|
%global with_help 1
|
||||||
Release: 1
|
%global modname py
|
||||||
Summary: library with cross-python path, ini-parsing, io, code, log facilities
|
%global modnameversion %{modname}-%{version}
|
||||||
License: MIT license
|
%global p2builddir python2tmp
|
||||||
URL: https://py.readthedocs.io/
|
%global p3builddir python3tmp
|
||||||
Source0: https://files.pythonhosted.org/packages/97/a6/ab9183fe08f69a53d06ac0ee8432bc0ffbb3989c575cc69b73a0229a9a99/py-1.9.0.tar.gz
|
|
||||||
BuildArch: noarch
|
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
|
||||||
|
|
||||||
|
%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\
|
||||||
@ -20,65 +31,73 @@ following tools and modules:\
|
|||||||
%description
|
%description
|
||||||
%{_description}
|
%{_description}
|
||||||
|
|
||||||
%package -n python3-py
|
%package -n python3-%{modname}
|
||||||
Summary: library with cross-python path, ini-parsing, io, code, log facilities
|
Summary: %{summary}
|
||||||
Provides: python-py
|
BuildRequires: python3-devel python3-setuptools python3-setuptools_scm
|
||||||
BuildRequires: python3-devel
|
%if 0%{?with_help}
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: %{_bindir}/sphinx-build-3
|
||||||
BuildRequires: python3-setuptools_scm
|
%endif
|
||||||
%description -n python3-py
|
%if %{with tests}
|
||||||
|
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
|
|
||||||
Summary: Development documents and examples for py
|
%if 0%{?with_help}
|
||||||
Provides: python3-py-doc
|
%package_help
|
||||||
%description help
|
%endif
|
||||||
%{_description}
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n py-1.9.0
|
%autosetup -c -n %{modnameversion}
|
||||||
|
|
||||||
|
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
|
||||||
install -d -m755 %{buildroot}/%{_pkgdocdir}
|
rm -rf doc/_build/html/.buildinfo
|
||||||
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 .
|
|
||||||
|
|
||||||
%files -n python3-py -f filelist.lst
|
%check
|
||||||
%dir %{python3_sitelib}/*
|
%if %{with tests}
|
||||||
|
pushd %{p3builddir}
|
||||||
|
PYTHONPATH=%{buildroot}%{python3_sitelib} LC_ALL="en_US.UTF-8" \
|
||||||
|
py.test-%{python3_version} -r s -k"-TestWCSvnCommandPath" testing
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%files help -f doclist.lst
|
%files -n python3-%{modname}
|
||||||
%{_pkgdocdir}
|
%license %{p3builddir}/LICENSE
|
||||||
|
%{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
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user