|
|
|
@ -1,34 +1,26 @@
|
|
|
|
|
# Ensure that pycparser uses the same YACC __tabversion__ as python-ply
|
|
|
|
|
# package to prevent "yacc table file version is out of date" problem.
|
|
|
|
|
%define ply_version %(LC_ALL=C rpm -q --qf '%%{VERSION}' python%{python3_pkgversion}-ply | grep -Eo '^[^.]+\.[^.]+')
|
|
|
|
|
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
|
|
|
|
|
Name: python-pycparser
|
|
|
|
|
Summary: C parser and AST generator written in Python
|
|
|
|
|
Version: 2.19
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Version: 2.20
|
|
|
|
|
Release: 6%{?dist}
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: http://github.com/eliben/pycparser
|
|
|
|
|
Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz
|
|
|
|
|
Source0: %{url}/archive/release_v%{version}.tar.gz
|
|
|
|
|
Source1: pycparser-0.91.1-remove-relative-sys-path.py
|
|
|
|
|
|
|
|
|
|
Patch100: pycparser-2.10-ply.patch
|
|
|
|
|
# This is Fedora-specific; I don't think we should request upstream to
|
|
|
|
|
# remove embedded libraries from their distribuution, when we can remove
|
|
|
|
|
# them during packaging.
|
|
|
|
|
# It also ensures that pycparser uses the same YACC __tabversion__ as ply
|
|
|
|
|
# package to prevent "yacc table file version is out of date" problem.
|
|
|
|
|
Patch100: pycparser-unbundle-ply.patch
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# Exclude i686 arch. Due to a modularity issue it's being added to the
|
|
|
|
|
# x86_64 compose of CRB, but we don't want to ship it at all.
|
|
|
|
|
# See: https://projects.engineering.redhat.com/browse/RCM-72605
|
|
|
|
|
ExcludeArch: i686
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
BuildRequires: dos2unix
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-ply
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-ply
|
|
|
|
|
|
|
|
|
|
# for unit tests
|
|
|
|
|
%if %{with tests}
|
|
|
|
@ -40,31 +32,28 @@ pycparser is a complete parser for the C language, written in pure Python.
|
|
|
|
|
It is a module designed to be easily integrated into applications that
|
|
|
|
|
need to parse C source code.
|
|
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-pycparser
|
|
|
|
|
Summary: C parser and AST generator written in Python
|
|
|
|
|
Requires: python%{python3_pkgversion}-ply = %{ply_version}
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-pycparser}
|
|
|
|
|
%package -n python3-pycparser
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
%{?python_provide:%python_provide python3-pycparser}
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-pycparser
|
|
|
|
|
%description -n python3-pycparser
|
|
|
|
|
pycparser is a complete parser for the C language, written in pure Python.
|
|
|
|
|
It is a module designed to be easily integrated into applications that
|
|
|
|
|
need to parse C source code.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n pycparser-release_v%{version}
|
|
|
|
|
%patch100 -p1 -F5 -b .ply
|
|
|
|
|
%autosetup -p1 -n pycparser-release_v%{version}
|
|
|
|
|
|
|
|
|
|
# remove embedded copy of ply
|
|
|
|
|
rm -rf pycparser/ply
|
|
|
|
|
rm -r pycparser/ply
|
|
|
|
|
|
|
|
|
|
# examples
|
|
|
|
|
%{__python3} %{SOURCE1} examples
|
|
|
|
|
dos2unix LICENSE
|
|
|
|
|
# Remove relative sys.path from the examples
|
|
|
|
|
%{python3} %{SOURCE1} examples
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py3_build
|
|
|
|
|
pushd build/lib/pycparser
|
|
|
|
|
%{__python3} _build_tables.py
|
|
|
|
|
%{python3} _build_tables.py
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
@ -72,21 +61,42 @@ popd
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%{__python3} tests/all_tests.py
|
|
|
|
|
%{python3} tests/all_tests.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-pycparser
|
|
|
|
|
%files -n python3-pycparser
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc examples
|
|
|
|
|
%{python3_sitelib}/pycparser/
|
|
|
|
|
%{python3_sitelib}/pycparser-*.egg-info/
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 2.19-3
|
|
|
|
|
- Exclude unsupported i686 arch
|
|
|
|
|
* Tue Feb 08 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 2.20-6
|
|
|
|
|
- Add automatically generated Obsoletes tag with the python39- prefix
|
|
|
|
|
for smoother upgrade from RHEL8
|
|
|
|
|
- Related: rhbz#1990421
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.20-5
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.20-4
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.20-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.20-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 05 2020 Miro Hrončok <mhroncok@redhat.com> - 2.20-1
|
|
|
|
|
- Update to 2.20 (#1810349)
|
|
|
|
|
|
|
|
|
|
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 2.19-3
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 2.19-2
|
|
|
|
|
- Adjusted for Python 3.8 module in RHEL 8
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.19-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Nov 08 2019 Lumír Balhar <lbalhar@redhat.com> - 2.19-1
|
|
|
|
|
- New usptream version 2.19
|
|
|
|
|