From 0333c45cc9974b257d886980b3e9c4b9856c9429 Mon Sep 17 00:00:00 2001 From: lei_ju <983277505@qq.com> Date: Thu, 29 Oct 2020 10:35:14 +0800 Subject: [PATCH] remove python2 subpackage --- python-gflags.spec | 48 ++++++++++------------------------------------ 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/python-gflags.spec b/python-gflags.spec index e13f0a5..2cba4a8 100644 --- a/python-gflags.spec +++ b/python-gflags.spec @@ -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 - 2.0-17 +- remove python2 subpackage + * Thu Jan 8 2020 yanzhihua - 2.0-16 - Package init