Name: python-gflags Version: 2.0 Release: 17 Summary: Python commandline flags module License: BSD URL: https://github.com/google/python-gflags Source0: https://github.com/google/python-gflags/archive/python-gflags-2.0.tar.gz BuildArch: noarch %description 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 %{?python_provide:%python_provide python3-gflags} %description -n python3-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. %prep %setup -q -c mv python-gflags-python-gflags-2.0 python3 sed -i '1s|^#!%{__python2}$|#!%{__python3}|' python3/gflags2man.py 2to3 --write --nobackup python3 %build 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 .. %check cd python3 python3 setup.py test cd .. %files -n python3-gflags %license python3/COPYING %doc python3/AUTHORS python3/ChangeLog python3/COPYING python3/README %{_bindir}/gflags2man-3 %{python3_sitelib}/gflags*.py* %{python3_sitelib}/python_gflags-%{version}-*egg-info %{python3_sitelib}/__pycache__/* %changelog * Wed Oct 21 2020 leiju - 2.0-17 - remove python2 subpackage * Fri Jan 10 2020 yanzhihua - 2.0-16 - Package init