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