remove python2 subpackage
This commit is contained in:
parent
d426c6ee8a
commit
0333c45cc9
@ -1,6 +1,6 @@
|
||||
Name: python-gflags
|
||||
Version: 2.0
|
||||
Release: 16
|
||||
Release: 17
|
||||
Summary: Python commandline flags module
|
||||
License: BSD
|
||||
URL: https://github.com/google/python-gflags
|
||||
@ -13,17 +13,6 @@ processing. It is intended to be used in situations where a project wants to
|
||||
mimic the command-line flag handling of a C++ app that uses google-gflags for
|
||||
a Python app.
|
||||
|
||||
%package -n python2-gflags
|
||||
Summary: Python2 commandline flags module
|
||||
BuildRequires: python2-devel python2-setuptools
|
||||
%{?python_provide:%python_provide python2-gflags}
|
||||
|
||||
%description -n python2-gflags
|
||||
The python-gflags package contains a library that implements commandline flags
|
||||
processing. It is intended to be used in situations where a project wants to
|
||||
mimic the command-line flag handling of a C++ app that uses google-gflags for
|
||||
a Python app.
|
||||
|
||||
%package -n python3-gflags
|
||||
Summary: Python3 commandline flags module
|
||||
BuildRequires: python3-devel python3-setuptools python3-tools
|
||||
@ -37,46 +26,26 @@ a Python app.
|
||||
|
||||
%prep
|
||||
%setup -q -c
|
||||
mv python-gflags-python-gflags-2.0 python2
|
||||
sed -i '1s|^#!/usr/bin/env python$|#!%{__python2}|' python2/gflags2man.py
|
||||
sed -i '/^#!\/usr\/bin\/env python$/,+1 d' python2/gflags*.py
|
||||
cp -a python2 python3
|
||||
mv python-gflags-python-gflags-2.0 python3
|
||||
sed -i '1s|^#!%{__python2}$|#!%{__python3}|' python3/gflags2man.py
|
||||
2to3 --write --nobackup python3
|
||||
|
||||
|
||||
%build
|
||||
cd python2
|
||||
python2 setup.py build
|
||||
|
||||
cd ../python3
|
||||
cd python3
|
||||
python3 setup.py build
|
||||
cd ..
|
||||
|
||||
%install
|
||||
cd python3
|
||||
python3 setup.py install --skip-build --root %{buildroot}
|
||||
mv %{buildroot}%{_bindir}/gflags2man.py %{buildroot}%{_bindir}/gflags2man-3
|
||||
chmod +x %{buildroot}%{_bindir}/gflags2man-3
|
||||
|
||||
cd ../python2
|
||||
python2 setup.py install --skip-build --root %{buildroot}
|
||||
mv %{buildroot}%{_bindir}/gflags2man.py %{buildroot}%{_bindir}/gflags2man
|
||||
chmod +x %{buildroot}%{_bindir}/gflags2man
|
||||
cd ..
|
||||
|
||||
%check
|
||||
cd python2
|
||||
python2 setup.py test
|
||||
|
||||
cd ../python3
|
||||
cd python3
|
||||
python3 setup.py test
|
||||
|
||||
|
||||
%files -n python2-gflags
|
||||
%license python2/COPYING
|
||||
%doc python2/AUTHORS python2/ChangeLog python2/COPYING python2/README
|
||||
%{_bindir}/gflags2man
|
||||
%{python2_sitelib}/gflags*.py*
|
||||
%{python2_sitelib}/python_gflags-%{version}-*egg-info
|
||||
cd ..
|
||||
|
||||
%files -n python3-gflags
|
||||
%license python3/COPYING
|
||||
@ -88,5 +57,8 @@ python3 setup.py test
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Oct 21 2020 leiju <leiju4@huawei.com> - 2.0-17
|
||||
- remove python2 subpackage
|
||||
|
||||
* Thu Jan 8 2020 yanzhihua <yanzhihua4@huawei.com> - 2.0-16
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user