7895b80
%bcond_without tests
7895b80
d7547ff
Name:           python-pycparser
d7547ff
Summary:        C parser and AST generator written in Python
564c924
Version:        2.20
4ad5dc4
Release:        8%{?dist}
d7547ff
License:        BSD
d7547ff
URL:            http://github.com/eliben/pycparser
564c924
Source0:        %{url}/archive/release_v%{version}.tar.gz
d7547ff
Source1:        pycparser-0.91.1-remove-relative-sys-path.py
d7547ff
d7547ff
# This is Fedora-specific; I don't think we should request upstream to
d7547ff
# remove embedded libraries from their distribuution, when we can remove
d7547ff
# them during packaging.
564c924
# It also ensures that pycparser uses the same YACC __tabversion__ as ply
564c924
# package to prevent "yacc table file version is out of date" problem.
564c924
Patch100:       pycparser-unbundle-ply.patch
d7547ff
d7547ff
BuildArch:      noarch
d7547ff
564c924
BuildRequires:  python3-devel
564c924
BuildRequires:  python3-setuptools
7895b80
BuildRequires:  python3-ply
d7547ff
d7547ff
# for unit tests
7895b80
%if %{with tests}
abd777e
BuildRequires:  cpp
7895b80
%endif
d7547ff
Orion Poplawski 3842551
%description
Orion Poplawski 3842551
pycparser is a complete parser for the C language, written in pure Python.
Orion Poplawski 3842551
It is a module designed to be easily integrated into applications that
Orion Poplawski 3842551
need to parse C source code.
Orion Poplawski 3842551
89d533d
%package -n python3-pycparser
564c924
Summary:        %{summary}
Orion Poplawski 3842551
%{?python_provide:%python_provide python3-pycparser}
89d533d
89d533d
%description -n python3-pycparser
89d533d
pycparser is a complete parser for the C language, written in pure Python.
89d533d
It is a module designed to be easily integrated into applications that
89d533d
need to parse C source code.
89d533d
d7547ff
%prep
564c924
%autosetup -p1 -n pycparser-release_v%{version}
d7547ff
d7547ff
# remove embedded copy of ply
564c924
rm -r pycparser/ply
d7547ff
564c924
# Remove relative sys.path from the examples
564c924
%{python3} %{SOURCE1} examples
d7547ff
d7547ff
%build
Orion Poplawski 3842551
%py3_build
89d533d
pushd build/lib/pycparser
564c924
%{python3} _build_tables.py
89d533d
popd
d7547ff
d7547ff
%install
Orion Poplawski 3842551
%py3_install
89d533d
d7547ff
%check
7895b80
%if %{with tests}
564c924
%{python3} tests/all_tests.py
7895b80
%endif
d7547ff
 
89d533d
%files -n python3-pycparser
Orion Poplawski 3842551
%license LICENSE
Orion Poplawski 3842551
%doc examples
89d533d
%{python3_sitelib}/pycparser/
61e907b
%{python3_sitelib}/pycparser-*.egg-info/
89d533d
d7547ff
%changelog
4ad5dc4
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.20-8
4ad5dc4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
4ad5dc4
bb23488
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.20-7
bb23488
- Rebuilt for Python 3.11
bb23488
1723ac3
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.20-6
1723ac3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
1723ac3
e42f219
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.20-5
e42f219
- Second attempt - Rebuilt for
e42f219
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
e42f219
9803c41
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 2.20-4
9803c41
- Rebuilt for Python 3.10
9803c41
f7ddb34
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.20-3
f7ddb34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
f7ddb34
f36507a
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.20-2
f36507a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f36507a
564c924
* Fri Jun 05 2020 Miro Hrončok <mhroncok@redhat.com> - 2.20-1
564c924
- Update to 2.20 (#1810349)
564c924
6277a86
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 2.19-3
6277a86
- Rebuilt for Python 3.9
6277a86
21f8127
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.19-2
21f8127
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
21f8127
7895b80
* Fri Nov 08 2019 Lumír Balhar <lbalhar@redhat.com> - 2.19-1
7895b80
- New usptream version 2.19
7895b80
61e907b
* Sun Oct 20 2019 Miro Hrončok <mhroncok@redhat.com> - 2.14-23
61e907b
- Subpackage python2-ply has been removed
61e907b
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
61e907b
c2f4912
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.14-22
c2f4912
- Rebuilt for Python 3.8.0rc1 (#1748018)
c2f4912
c4e8e3e
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.14-21
c4e8e3e
- Rebuilt for Python 3.8
c4e8e3e
65fa2e1
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-20
65fa2e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
65fa2e1
Marcel Plch 268b157
* Mon Jun 10 2019 Marcel Plch <mplch@redhat.com> - 2.14-19
Marcel Plch 268b157
- Avoid invalid unicode escape sequences in Py3.8
Marcel Plch 268b157
abd777e
* Tue Feb 26 2019 Christian Heimes <cheimes@redhat.com> - 2.14-18
abd777e
- Add build dependency on cpp for unit tests
abd777e
- Add dependency on python-ply version to prevent "yacc table file version is out of date"
abd777e
- Fixes RHBZ#1668230
abd777e
5ff5bcf
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-17
5ff5bcf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
5ff5bcf
ed0202f
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-16
ed0202f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ed0202f
746b5e6
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.14-15
746b5e6
- Rebuilt for Python 3.7
746b5e6
cc51b50
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.14-14
cc51b50
- Update Python 2 dependency declarations to new packaging standards
cc51b50
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
cc51b50
f210021
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-13
f210021
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f210021
2438ee2
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 2.14-12
2438ee2
- Cleanup spec file conditionals
2438ee2
d5641b3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-11
d5641b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
d5641b3
e2ddbc1
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-10
e2ddbc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e2ddbc1
Orion Poplawski 3842551
* Fri Jan 6 2017 Orion Poplawski <orion@cora.nwra.com> - 2.14-9
Orion Poplawski 3842551
- Ship python2-pycparser
Orion Poplawski 3842551
- Modernize spec
Orion Poplawski 3842551
e840c40
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.14-8
e840c40
- Rebuild for Python 3.6
e840c40
f65b993
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-7
f65b993
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
f65b993
da3e340
* Fri Jul  8 2016 Tom Callaway <spot@fedoraproject.org> - 2.14-6
da3e340
- rebuild to update yacctab.py
da3e340
25bff03
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-5
25bff03
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
25bff03
Robert Kuska 4af28b2
* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 2.14-4
Robert Kuska 4af28b2
- Rebuilt for Python3.5 rebuild
Robert Kuska 4af28b2
2cf84e3
* Tue Jul 14 2015 Stephen Gallagher <sgallagh@redhat.com> - 2.14-3
2cf84e3
- Rebuild alongside python-ply 3.6
2cf84e3
b2e6fbe
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-2
b2e6fbe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b2e6fbe
Nathaniel McCallum a37302a
* Tue Jun 09 2015 Nathaniel McCallum <npmccallum@redhat.com> - 2.14-1
Nathaniel McCallum a37302a
- Update to 2.14
Nathaniel McCallum a37302a
ff308de
* Wed Aug 20 2014 Eric Smith <brouhaha@fedoraproject.org> 2.10-1
ff308de
- Update to latest upstream.
ff308de
51a5642
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-9
51a5642
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
51a5642
cd1020d
* Mon May 12 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.09.1-8
cd1020d
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
cd1020d
b95d3a4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-7
b95d3a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b95d3a4
89d533d
* Tue Jul 23 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-6
89d533d
- Added Python 3 support.
89d533d
d7547ff
* Mon Jul 22 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-5
d7547ff
- Renumbered Fedora-specific Patch1 to Patch100
d7547ff
- Added new Patch1 to fix table generation when the build system
d7547ff
  already has a python-pycparser package installed.
d7547ff
- Submitted Patch0 and Patch1 as upstream issues.
d7547ff
- Added comments about patches.
d7547ff
d7547ff
* Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-4
d7547ff
- Upstream repository is now on github.
d7547ff
- Fix rpmlint strange-permission complaint.
d7547ff
- Rename patches, Source1 to all start with pycparser-{version}, to
d7547ff
  simplify updating patches for future upstream releases.
d7547ff
d7547ff
* Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-3
d7547ff
- Run _build_tables.py to build the lextab.py and yacctab.py; otherwise
d7547ff
  they have to be regenerated at runtime for no benefit.
d7547ff
d7547ff
* Tue Mar 19 2013 Jos de Kloe <josdekloe@gmail.com> 2.09.1-2
d7547ff
- remove the embedded ply code
d7547ff
d7547ff
* Fri Jan 18 2013 Scott Tsai <scottt.tw@gmail.com> 2.09.1-1
d7547ff
- upstream 2.09.1