Remove python2

This commit is contained in:
jpzhang 2020-08-11 10:14:36 +08:00
parent 640b801380
commit eb8355cc59

View File

@ -8,7 +8,7 @@
Name: python-%{modname} Name: python-%{modname}
Version: 1.5.4 Version: 1.5.4
Release: 4 Release: 5
Summary: Library with cross-python path, ini-parsing, io, code, log facilities Summary: Library with cross-python path, ini-parsing, io, code, log facilities
License: MIT and Public Domain License: MIT and Public Domain
URL: http://pylib.readthedocs.io/en/stable/ URL: http://pylib.readthedocs.io/en/stable/
@ -31,22 +31,6 @@ following tools and modules:\
%description %description
%{_description} %{_description}
%package -n python2-%{modname}
Summary: %{summary}
BuildRequires: python2-devel python2-setuptools python2-setuptools_scm
%if 0%{?with_help}
BuildRequires: %{_bindir}/sphinx-build-2
%endif
%if %{with tests}
BuildRequires: python2-pytest >= 2.9.0, python2-pytest < 2.10
%endif
Requires: python2-setuptools
%{?python_provide:%python_provide python2-%{modname}}
Provides: bundled(python2-apipkg) = 1.4 bundled(python2-iniconfig) = 1.0.0
%description -n python2-%{modname}
%{_description}
%package -n python3-%{modname} %package -n python3-%{modname}
Summary: %{summary} Summary: %{summary}
BuildRequires: python3-devel python3-setuptools python3-setuptools_scm BuildRequires: python3-devel python3-setuptools python3-setuptools_scm
@ -77,14 +61,9 @@ find %{modnameversion} \
-exec sed -i '1{/^#!/d}' {} \; \ -exec sed -i '1{/^#!/d}' {} \; \
-exec chmod u=rw,go=r {} \; -exec chmod u=rw,go=r {} \;
mv %{modnameversion} %{p2builddir} mv %{modnameversion} %{p3builddir}
cp -a %{p2builddir} %{p3builddir}
%build %build
pushd %{p2builddir}
%py2_build
popd
pushd %{p3builddir} pushd %{p3builddir}
%py3_build %py3_build
%if 0%{?with_help} %if 0%{?with_help}
@ -93,10 +72,6 @@ make -C doc html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-3
popd popd
%install %install
pushd %{p2builddir}
%py2_install
popd
pushd %{p3builddir} pushd %{p3builddir}
%py3_install %py3_install
rm -rf doc/_build/html/.buildinfo rm -rf doc/_build/html/.buildinfo
@ -104,22 +79,12 @@ popd
%check %check
%if %{with tests} %if %{with tests}
pushd %{p2builddir}
PYTHONPATH=%{buildroot}%{python2_sitelib} LC_ALL="en_US.UTF-8" \
py.test-%{python2_version} -r s -k"-TestWCSvnCommandPath" testing
popd
pushd %{p3builddir} pushd %{p3builddir}
PYTHONPATH=%{buildroot}%{python3_sitelib} LC_ALL="en_US.UTF-8" \ PYTHONPATH=%{buildroot}%{python3_sitelib} LC_ALL="en_US.UTF-8" \
py.test-%{python3_version} -r s -k"-TestWCSvnCommandPath" testing py.test-%{python3_version} -r s -k"-TestWCSvnCommandPath" testing
popd popd
%endif %endif
%files -n python2-%{modname}
%license %{p2builddir}/LICENSE
%{python2_sitelib}/py-*.egg-info/
%{python2_sitelib}/py/
%files -n python3-%{modname} %files -n python3-%{modname}
%license %{p3builddir}/LICENSE %license %{p3builddir}/LICENSE
%{python3_sitelib}/py-*.egg-info/ %{python3_sitelib}/py-*.egg-info/
@ -133,5 +98,8 @@ popd
%endif %endif
%changelog %changelog
* 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 * Tue Dec 10 2019 mengxian <mengxian@huawei.com> - 1.5.4-4
- Package init - Package init