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