]> git.pld-linux.org Git - packages/python-pycparser.git/blob - python-pycparser.spec
- updated to 2.17
[packages/python-pycparser.git] / python-pycparser.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 #
6 Summary:        C Parser in Python 2
7 Summary(pl.UTF-8):      Parser języka C w Pythonie 2
8 Name:           python-pycparser
9 Version:        2.17
10 Release:        1
11 License:        BSD
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
18 %if %{with python2}
19 BuildRequires:  python >= 2
20 BuildRequires:  python-modules >= 2
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3 >= 1:3.2
24 BuildRequires:  python3-devel >= 1:3.2
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.710
28 Requires:       python-modules
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
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.
36
37 This package contains Python 2 module.
38
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.
43
44 Ten pakiet zawiera moduł Pythona 2.
45
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
51
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.
56
57 This package contains Python 3 module.
58
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.
63
64 Ten pakiet zawiera moduł Pythona 3.
65
66 %prep
67 %setup -q -n pycparser-release_v%{version}
68
69 %build
70 %if %{with python2}
71 %py_build
72 %endif
73 %if %{with python3}
74 %py3_build
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %if %{with python2}
81 %py_install
82
83 %py_postclean
84 %endif
85
86 %if %{with python3}
87 %py3_install
88 %endif
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python2}
94 %files
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
103 %endif
104
105 %if %{with python3}
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
117 %endif
This page took 0.079062 seconds and 3 git commands to generate.