]> git.pld-linux.org Git - packages/python-pycparser.git/blame - python-pycparser.spec
- updated to 2.17
[packages/python-pycparser.git] / python-pycparser.spec
CommitLineData
f0a811fc
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5#
6Summary: C Parser in Python 2
7Summary(pl.UTF-8): Parser języka C w Pythonie 2
8Name: python-pycparser
0135094e
JB
9Version: 2.17
10Release: 1
f0a811fc
JB
11License: BSD
12Group: Libraries/Python
0135094e
JB
13#Source0: https://pypi.python.org/packages/source/p/pycparser/pycparser-%{version}.tar.gz
14#Source0Download: https://github.com/eliben/pycparser/releases
15Source0: https://github.com/eliben/pycparser/archive/release_v%{version}/pycparser-%{version}.tar.gz
16# Source0-md5: 4c2f7f6311c6d9a6f1887c80724675d9
f0a811fc
JB
17URL: https://github.com/eliben/pycparser
18%if %{with python2}
19BuildRequires: python >= 2
20BuildRequires: python-modules >= 2
f0a811fc
JB
21%endif
22%if %{with python3}
53d2ceef
JB
23BuildRequires: python3 >= 1:3.2
24BuildRequires: python3-devel >= 1:3.2
f0a811fc
JB
25%endif
26BuildRequires: rpm-pythonprov
aa105b5c 27BuildRequires: rpmbuild(macros) >= 1.710
f0a811fc
JB
28Requires: python-modules
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33pycparser is a parser for the C language, written in pure Python. It
34is a module designed to be easily integrated into applications that
35need to parse C source code.
36
37This package contains Python 2 module.
38
39%description -l pl.UTF-8
40pycparser to parser języka C napisany w czystym Pythonie. Jest to
41moduł zaprojektowany tak, aby można go było łatwo zintegrować w
42aplikacjach wymagających analizy kodu źródłowego w C.
43
44Ten pakiet zawiera moduł Pythona 2.
45
46%package -n python3-pycparser
47Summary: C Parser in Python 3
48Summary(pl.UTF-8): Parser języka C w Pythonie 3
49Group: Libraries/Python
50Requires: python3-modules
51
52%description -n python3-pycparser
53pycparser is a parser for the C language, written in pure Python. It
54is a module designed to be easily integrated into applications that
55need to parse C source code.
56
57This package contains Python 3 module.
58
59%description -n python3-pycparser -l pl.UTF-8
60pycparser to parser języka C napisany w czystym Pythonie. Jest to
61moduł zaprojektowany tak, aby można go było łatwo zintegrować w
62aplikacjach wymagających analizy kodu źródłowego w C.
63
64Ten pakiet zawiera moduł Pythona 3.
65
66%prep
0135094e 67%setup -q -n pycparser-release_v%{version}
f0a811fc
JB
68
69%build
70%if %{with python2}
84437a10 71%py_build
f0a811fc
JB
72%endif
73%if %{with python3}
84437a10 74%py3_build
f0a811fc
JB
75%endif
76
77%install
78rm -rf $RPM_BUILD_ROOT
79
80%if %{with python2}
84437a10 81%py_install
f0a811fc
JB
82
83%py_postclean
84%endif
85
86%if %{with python3}
84437a10 87%py3_install
f0a811fc
JB
88%endif
89
90%clean
91rm -rf $RPM_BUILD_ROOT
92
93%if %{with python2}
94%files
95%defattr(644,root,root,755)
0135094e 96%doc CHANGES CONTRIBUTORS LICENSE README.rst
f0a811fc
JB
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
103%endif
104
105%if %{with python3}
106%files -n python3-pycparser
107%defattr(644,root,root,755)
0135094e 108%doc CHANGES CONTRIBUTORS LICENSE README.rst
f0a811fc
JB
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
117%endif
This page took 0.116651 seconds and 4 git commands to generate.