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