Blame SPECS/python-pycparser.spec

9681aa
%{?scl:%scl_package python-pycparser}
9681aa
%{!?scl:%global pkg_name %{name}}
9681aa
9681aa
%global python3_pkgversion %{nil}
9681aa
9681aa
%bcond_without tests
9681aa
9681aa
Name:           %{?scl_prefix}python-pycparser
9681aa
Summary:        C parser and AST generator written in Python
9681aa
Version:        2.19
9681aa
Release:        4%{?dist}
9681aa
License:        BSD
9681aa
URL:            http://github.com/eliben/pycparser
9681aa
Source0:        http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz
9681aa
Source1:        pycparser-0.91.1-remove-relative-sys-path.py
9681aa
9681aa
Patch100:       pycparser-2.10-ply.patch
9681aa
# This is Fedora-specific; I don't think we should request upstream to
9681aa
# remove embedded libraries from their distribuution, when we can remove
9681aa
# them during packaging.
9681aa
9681aa
BuildArch:      noarch
9681aa
9681aa
%{?scl:Requires: %{scl}-runtime}
9681aa
%{?scl:BuildRequires: %{scl}-runtime}
9681aa
BuildRequires:  %{?scl_prefix}python%{python3_pkgversion}-devel
9681aa
BuildRequires:  %{?scl_prefix}python%{python3_pkgversion}-setuptools
9681aa
BuildRequires:  dos2unix
9681aa
BuildRequires:  %{?scl_prefix}python%{python3_pkgversion}-ply
9681aa
BuildRequires:  %{?scl_prefix}python%{python3_pkgversion}-rpm-macros
9681aa
9681aa
Requires:  %{?scl_prefix}python%{python3_pkgversion}-ply = 3.11
9681aa
9681aa
# for unit tests
9681aa
%if %{with tests}
9681aa
BuildRequires:  cpp
9681aa
%endif
9681aa
9681aa
9681aa
%description
9681aa
pycparser is a complete parser for the C language, written in pure Python.
9681aa
It is a module designed to be easily integrated into applications that
9681aa
need to parse C source code.
9681aa
9681aa
9681aa
%prep
9681aa
%{?scl:scl enable %{scl} - << \EOF}
9681aa
set -ex
9681aa
%setup -q -n pycparser-release_v%{version}
9681aa
%patch100 -p1 -F5 -b .ply
9681aa
9681aa
# remove embedded copy of ply
9681aa
rm -rf pycparser/ply
9681aa
9681aa
# examples
9681aa
%{__python3} %{SOURCE1} examples
9681aa
dos2unix LICENSE
9681aa
%{?scl:EOF}
9681aa
9681aa
9681aa
%build
9681aa
%{?scl:scl enable %{scl} - << \EOF}
9681aa
set -ex
9681aa
%py3_build
9681aa
pushd build/lib/pycparser
9681aa
%{__python3} _build_tables.py
9681aa
popd
9681aa
%{?scl:EOF}
9681aa
9681aa
9681aa
%install
9681aa
%{?scl:scl enable %{scl} - << \EOF}
9681aa
set -ex
9681aa
%py3_install
9681aa
%{?scl:EOF}
9681aa
9681aa
9681aa
%check
9681aa
%{?scl:scl enable %{scl} - << \EOF}
9681aa
set -ex
9681aa
%if %{with tests}
9681aa
%{__python3} tests/all_tests.py
9681aa
%endif
9681aa
%{?scl:EOF}
9681aa
9681aa
9681aa
%files
9681aa
%license LICENSE
9681aa
%doc examples
9681aa
%{python3_sitelib}/pycparser/
9681aa
%{python3_sitelib}/pycparser-*.egg-info/
9681aa
9681aa
9681aa
%changelog
9681aa
* Wed Feb 05 2020 Lumír Balhar <lbalhar@redhat.com> - 2.19-4
9681aa
- Import from the python38 module and modified for rh-python38 RHSCL
9681aa
Resolves: rhbz#1671025
9681aa
9681aa
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 2.19-3
9681aa
- Exclude unsupported i686 arch
9681aa
9681aa
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 2.19-2
9681aa
- Adjusted for Python 3.8 module in RHEL 8
9681aa
9681aa
* Fri Nov 08 2019 Lumír Balhar <lbalhar@redhat.com> - 2.19-1
9681aa
- New usptream version 2.19
9681aa
9681aa
* Sun Oct 20 2019 Miro Hrončok <mhroncok@redhat.com> - 2.14-23
9681aa
- Subpackage python2-ply has been removed
9681aa
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
9681aa
9681aa
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.14-22
9681aa
- Rebuilt for Python 3.8.0rc1 (#1748018)
9681aa
9681aa
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.14-21
9681aa
- Rebuilt for Python 3.8
9681aa
9681aa
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-20
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
9681aa
9681aa
* Mon Jun 10 2019 Marcel Plch <mplch@redhat.com> - 2.14-19
9681aa
- Avoid invalid unicode escape sequences in Py3.8
9681aa
9681aa
* Tue Feb 26 2019 Christian Heimes <cheimes@redhat.com> - 2.14-18
9681aa
- Add build dependency on cpp for unit tests
9681aa
- Add dependency on python-ply version to prevent "yacc table file version is out of date"
9681aa
- Fixes RHBZ#1668230
9681aa
9681aa
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-17
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
9681aa
9681aa
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-16
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
9681aa
9681aa
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.14-15
9681aa
- Rebuilt for Python 3.7
9681aa
9681aa
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.14-14
9681aa
- Update Python 2 dependency declarations to new packaging standards
9681aa
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
9681aa
9681aa
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-13
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9681aa
9681aa
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 2.14-12
9681aa
- Cleanup spec file conditionals
9681aa
9681aa
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-11
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9681aa
9681aa
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-10
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9681aa
9681aa
* Fri Jan 6 2017 Orion Poplawski <orion@cora.nwra.com> - 2.14-9
9681aa
- Ship python2-pycparser
9681aa
- Modernize spec
9681aa
9681aa
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.14-8
9681aa
- Rebuild for Python 3.6
9681aa
9681aa
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-7
9681aa
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
9681aa
9681aa
* Fri Jul  8 2016 Tom Callaway <spot@fedoraproject.org> - 2.14-6
9681aa
- rebuild to update yacctab.py
9681aa
9681aa
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-5
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9681aa
9681aa
* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 2.14-4
9681aa
- Rebuilt for Python3.5 rebuild
9681aa
9681aa
* Tue Jul 14 2015 Stephen Gallagher <sgallagh@redhat.com> - 2.14-3
9681aa
- Rebuild alongside python-ply 3.6
9681aa
9681aa
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-2
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9681aa
9681aa
* Tue Jun 09 2015 Nathaniel McCallum <npmccallum@redhat.com> - 2.14-1
9681aa
- Update to 2.14
9681aa
9681aa
* Wed Aug 20 2014 Eric Smith <brouhaha@fedoraproject.org> 2.10-1
9681aa
- Update to latest upstream.
9681aa
9681aa
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-9
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9681aa
9681aa
* Mon May 12 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.09.1-8
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
9681aa
9681aa
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-7
9681aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9681aa
9681aa
* Tue Jul 23 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-6
9681aa
- Added Python 3 support.
9681aa
9681aa
* Mon Jul 22 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-5
9681aa
- Renumbered Fedora-specific Patch1 to Patch100
9681aa
- Added new Patch1 to fix table generation when the build system
9681aa
  already has a python-pycparser package installed.
9681aa
- Submitted Patch0 and Patch1 as upstream issues.
9681aa
- Added comments about patches.
9681aa
9681aa
* Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-4
9681aa
- Upstream repository is now on github.
9681aa
- Fix rpmlint strange-permission complaint.
9681aa
- Rename patches, Source1 to all start with pycparser-{version}, to
9681aa
  simplify updating patches for future upstream releases.
9681aa
9681aa
* Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-3
9681aa
- Run _build_tables.py to build the lextab.py and yacctab.py; otherwise
9681aa
  they have to be regenerated at runtime for no benefit.
9681aa
9681aa
* Tue Mar 19 2013 Jos de Kloe <josdekloe@gmail.com> 2.09.1-2
9681aa
- remove the embedded ply code
9681aa
9681aa
* Fri Jan 18 2013 Scott Tsai <scottt.tw@gmail.com> 2.09.1-1
9681aa
- upstream 2.09.1