3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 Summary: C Parser in Python 2
7 Summary(pl.UTF-8): Parser języka C w Pythonie 2
12 Group: Libraries/Python
13 #Source0: https://pypi.python.org/packages/source/p/pycparser/pycparser-%{version}.tar.gz
14 #Source0Download: https://github.com/eliben/pycparser/releases
15 Source0: https://github.com/eliben/pycparser/archive/release_v%{version}/pycparser-%{version}.tar.gz
16 # Source0-md5: 4c2f7f6311c6d9a6f1887c80724675d9
17 URL: https://github.com/eliben/pycparser
19 BuildRequires: python >= 2
20 BuildRequires: python-modules >= 2
23 BuildRequires: python3 >= 1:3.2
24 BuildRequires: python3-devel >= 1:3.2
26 BuildRequires: rpm-pythonprov
27 BuildRequires: rpmbuild(macros) >= 1.710
28 Requires: python-modules
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 pycparser is a parser for the C language, written in pure Python. It
34 is a module designed to be easily integrated into applications that
35 need to parse C source code.
37 This package contains Python 2 module.
39 %description -l pl.UTF-8
40 pycparser to parser języka C napisany w czystym Pythonie. Jest to
41 moduł zaprojektowany tak, aby można go było łatwo zintegrować w
42 aplikacjach wymagających analizy kodu źródłowego w C.
44 Ten pakiet zawiera moduł Pythona 2.
46 %package -n python3-pycparser
47 Summary: C Parser in Python 3
48 Summary(pl.UTF-8): Parser języka C w Pythonie 3
49 Group: Libraries/Python
50 Requires: python3-modules
52 %description -n python3-pycparser
53 pycparser is a parser for the C language, written in pure Python. It
54 is a module designed to be easily integrated into applications that
55 need to parse C source code.
57 This package contains Python 3 module.
59 %description -n python3-pycparser -l pl.UTF-8
60 pycparser to parser języka C napisany w czystym Pythonie. Jest to
61 moduł zaprojektowany tak, aby można go było łatwo zintegrować w
62 aplikacjach wymagających analizy kodu źródłowego w C.
64 Ten pakiet zawiera moduł Pythona 3.
67 %setup -q -n pycparser-release_v%{version}
78 rm -rf $RPM_BUILD_ROOT
91 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc CHANGES CONTRIBUTORS LICENSE README.rst
97 %dir %{py_sitescriptdir}/pycparser
98 %{py_sitescriptdir}/pycparser/*.py[co]
99 %{py_sitescriptdir}/pycparser/_c_ast.cfg
100 %dir %{py_sitescriptdir}/pycparser/ply
101 %{py_sitescriptdir}/pycparser/ply/*.py[co]
102 %{py_sitescriptdir}/pycparser-%{version}-py*.egg-info
106 %files -n python3-pycparser
107 %defattr(644,root,root,755)
108 %doc CHANGES CONTRIBUTORS LICENSE README.rst
109 %dir %{py3_sitescriptdir}/pycparser
110 %{py3_sitescriptdir}/pycparser/*.py
111 %{py3_sitescriptdir}/pycparser/_c_ast.cfg
112 %{py3_sitescriptdir}/pycparser/__pycache__
113 %dir %{py3_sitescriptdir}/pycparser/ply
114 %{py3_sitescriptdir}/pycparser/ply/*.py
115 %{py3_sitescriptdir}/pycparser/ply/__pycache__
116 %{py3_sitescriptdir}/pycparser-%{version}-py*.egg-info