From 61e907b722be5ae35adbaf9a5307f502c1909395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 20 Oct 2019 14:27:07 +0200 Subject: [PATCH] Subpackage python2-ply has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal --- python-pycparser.spec | 59 +++++++------------------------------------ 1 file changed, 9 insertions(+), 50 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 0e30fd0..f8006a8 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -1,7 +1,3 @@ -%if 0%{?fedora} || 0%{?rhel} >= 8 -%global with_python3 1 -%endif - # 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}' python3-ply | grep -Eo '^[^.]+\.[^.]+') @@ -9,7 +5,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 22%{?dist} +Release: 23%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz @@ -27,35 +23,18 @@ Patch100: pycparser-2.10-ply.patch BuildArch: noarch -BuildRequires: python2-devel python2-setuptools +BuildRequires: python3-devel python3-setuptools # for unit tests BuildRequires: dos2unix -BuildRequires: python2-ply >= 3.6 BuildRequires: cpp - -%if 0%{?with_python3} -BuildRequires: python3-devel python3-setuptools -# for unit tests -BuildRequires: python3-ply -%endif # if with_python3 +BuildRequires: python3-ply %description 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 python2-pycparser -Summary: C parser and AST generator written in Python -Requires: python2-ply = %{ply_version} -%{?python_provide:%python_provide python2-pycparser} - -%description -n python2-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. - -%if 0%{?with_python3} %package -n python3-pycparser Summary: C parser and AST generator written in Python Requires: python3-ply = %{ply_version} @@ -65,7 +44,6 @@ Requires: python3-ply = %{ply_version} 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. -%endif # if with_python3 %prep %setup -q -n pycparser-release_v%{version} @@ -76,51 +54,32 @@ need to parse C source code. rm -rf pycparser/ply # examples -%{__python2} %{SOURCE1} examples +%{__python3} %{SOURCE1} examples dos2unix LICENSE %build -%py2_build -pushd build/lib/pycparser -%{__python2} _build_tables.py -popd - -%if 0%{?with_python3} %py3_build pushd build/lib/pycparser %{__python3} _build_tables.py popd -%endif # with_python3 %install -%py2_install - -%if 0%{?with_python3} %py3_install -%endif # with_python3 %check -%{__python2} tests/all_tests.py - -%if 0%{?with_python3} %{__python3} tests/all_tests.py -%endif # with_python3 -%files -n python2-pycparser -%license LICENSE -%doc examples -%{python2_sitelib}/pycparser/ -%{python2_sitelib}/pycparser-*.egg-info - -%if 0%{?with_python3} %files -n python3-pycparser %license LICENSE %doc examples %{python3_sitelib}/pycparser/ -%{python3_sitelib}/pycparser-*.egg-info -%endif # with_python3 +%{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Sun Oct 20 2019 Miro Hrončok - 2.14-23 +- Subpackage python2-ply has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + * Thu Oct 03 2019 Miro Hrončok - 2.14-22 - Rebuilt for Python 3.8.0rc1 (#1748018)