%if 0%{?fedora} %global with_python3 1 %else %global with_python3 0 %endif Name: python-gccinvocation Version: 0.1 Release: 11%{?dist} Summary: Library for parsing GCC command-line options License: LGPLv2+ URL: https://github.com/fedora-static-analysis/gccinvocation Source0: https://pypi.python.org/packages/source/g/gccinvocation/gccinvocation-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel %if 0%{?with_python3} BuildRequires: python3-devel # ^^^: used during selftests %endif %description "gccinvocation" is a python module that can parse gcc command lines and extract data of interest e.g. include paths, defines, etc. %if 0%{?with_python3} %package -n python3-gccinvocation Summary: Library for parsing GCC command-line options Group: Applications/System %description -n python3-gccinvocation "gccinvocation" is a python module that can parse gcc command lines and extract data of interest e.g. include paths, defines, etc. %endif # with_python3 %prep %setup -q -n gccinvocation-%{version} %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif # with_python3 %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install %{__python} setup.py install --skip-build --root %{buildroot} %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} popd %endif # with_python3 %check %{__python} gccinvocation.py -v %if 0%{?with_python3} %{__python3} gccinvocation.py -v %endif # with_python3 %files %doc README.rst lgpl-2.1.txt %{python_sitelib}/gccinvocation-%{version}-py2.?.egg-info %{python_sitelib}/gccinvocation.py %{python_sitelib}/gccinvocation.py[co] %files -n python3-gccinvocation %if 0%{?with_python3} %doc README.rst lgpl-2.1.txt %{python3_sitelib}/gccinvocation-%{version}-py3.?.egg-info %{python3_sitelib}/gccinvocation.py %{python3_sitelib}/__pycache__/gccinvocation.cpython-*.py[co] %endif # with_python3 %changelog * Sat Feb 11 2017 Fedora Release Engineering - 0.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro HronĨok - 0.1-10 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 0.1-9 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 0.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 28 2014 Kalev Lember - 0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 * Sun Aug 04 2013 Fedora Release Engineering - 0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue Jun 25 2013 David Malcolm - 0.1-2 - remove redundant clean of buildroot from install phase; change BR from python-devel to python2-devel; add trailing period to description * Fri May 31 2013 David Malcolm - 0.1-1 - initial packaging