Remove python2-linecache2 subpackage

This commit is contained in:
lingsheng 2020-08-10 15:41:33 +08:00
parent da53c9df61
commit 8fd9a10f9a

View File

@ -6,80 +6,44 @@ linecache to older supported Python versions.
Name: python-linecache2 Name: python-linecache2
Version: 1.0.0 Version: 1.0.0
Release: 18 Release: 19
Summary: A backport of linecache to older supported Python versions Summary: A backport of linecache to older supported Python versions
License: Python License: Python
URL: https://github.com/testing-cabal/linecache2 URL: https://github.com/testing-cabal/linecache2
Source0: http://pypi.python.org/packages/source/l/linecache2/linecache2-%{version}.tar.gz Source0: http://pypi.python.org/packages/source/l/linecache2/linecache2-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel python2-pbr python3-devel python3-pbr BuildRequires: python3-devel python3-pbr python3-fixtures python3-unittest2
BuildRequires: python2-fixtures python2-unittest2 python3-fixtures python3-unittest2
%description %description
%{package_description} %{package_description}
%package -n python2-linecache2
Summary: A backport of linecache to older supported Python versions
%{?python_provide:%python_provide python2-linecache2}
%description -n python2-linecache2
%{package_description}
%package -n python3-linecache2 %package -n python3-linecache2
Summary: A backport of linecache to older supported Python versions Summary: A backport of linecache to older supported Python versions
%description -n python3-linecache2 %description -n python3-linecache2
%{package_description} %{package_description}
%prep %prep
%autosetup -c %autosetup -n linecache2-%{version}
mv linecache2-%{version} python2 mv linecache2/tests .
mv python2/linecache2/tests .
cp -a python2 python3
%build %build
cd python2 %py3_build
%{__python2} setup.py build
cd -
cd python3
%{__python3} setup.py build
cd -
%install %install
cd python3 %py3_install
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
cd -
cd python2 mv tests linecache2/
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
cd -
%check
cd python2
mv ../tests linecache2/
%{__python2} -m unittest2 -v
mv linecache2/tests ../
cd -
cd python3
mv ../tests linecache2/
%{__python3} -m unittest2 -v %{__python3} -m unittest2 -v
mv linecache2/tests ../ mv linecache2/tests .
%files -n python2-linecache2
%doc python2/AUTHORS python2/ChangeLog python2/README.rst
%{python2_sitelib}/*
%files -n python3-linecache2 %files -n python3-linecache2
%doc python3/AUTHORS python3/ChangeLog python3/README.rst %doc AUTHORS ChangeLog README.rst
%{python3_sitelib}/* %{python3_sitelib}/*
%changelog %changelog
* Mon Aug 10 2020 lingsheng <lingsheng@huawei.com> - 1.0.0-19
- Remove python2-linecache2 subpackage
* Tue Nov 26 2019 lihao <lihao129@huawei.com> - 1.0.0-18 * Tue Nov 26 2019 lihao <lihao129@huawei.com> - 1.0.0-18
- Package Init - Package Init