1 | %global with_python3 1 |
---|
2 | |
---|
3 | Name: python-pycparser |
---|
4 | Summary: C parser and AST generator written in Python |
---|
5 | Version: 2.20 |
---|
6 | Release: 1%{?_dist_release} |
---|
7 | Group: programming |
---|
8 | Vendor: Project Vine |
---|
9 | Distribution: Vine Linux |
---|
10 | |
---|
11 | License: BSD |
---|
12 | URL: http://github.com/eliben/pycparser |
---|
13 | Source0: https://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz#/pycparser-%{version}.tar.gz |
---|
14 | Source1: pycparser-0.91.1-remove-relative-sys-path.py |
---|
15 | |
---|
16 | BuildArch: noarch |
---|
17 | |
---|
18 | BuildRequires: python-rpm-macros |
---|
19 | BuildRequires: python2-rpm-macros |
---|
20 | BuildRequires: python-devel python-setuptools |
---|
21 | %{?python_provide:%python_provide python-pycparser} |
---|
22 | |
---|
23 | %if 0%{?with_python3} |
---|
24 | BuildRequires: python3-rpm-macros |
---|
25 | BuildRequires: python3-devel python3-setuptools |
---|
26 | %endif # if with_python3 |
---|
27 | |
---|
28 | BuildRequires: dos2unix |
---|
29 | |
---|
30 | %description |
---|
31 | pycparser is a complete parser for the C language, written in pure Python. |
---|
32 | It is a module designed to be easily integrated into applications that |
---|
33 | need to parse C source code. |
---|
34 | |
---|
35 | |
---|
36 | %if 0%{?with_python3} |
---|
37 | %package -n python3-pycparser |
---|
38 | Summary: C parser and AST generator written in Python |
---|
39 | Group: programming |
---|
40 | %{?python_provide:%python_provide python3-pycparser} |
---|
41 | |
---|
42 | %description -n python3-pycparser |
---|
43 | pycparser is a complete parser for the C language, written in pure Python. |
---|
44 | It is a module designed to be easily integrated into applications that |
---|
45 | need to parse C source code. |
---|
46 | %endif # if with_python3 |
---|
47 | |
---|
48 | |
---|
49 | %prep |
---|
50 | %setup -q -n pycparser-release_v%{version} |
---|
51 | |
---|
52 | # examples |
---|
53 | %{__python2} %{SOURCE1} examples |
---|
54 | dos2unix LICENSE |
---|
55 | |
---|
56 | |
---|
57 | %build |
---|
58 | %py2_build |
---|
59 | pushd build/lib/pycparser |
---|
60 | %{__python2} _build_tables.py |
---|
61 | popd |
---|
62 | |
---|
63 | %if 0%{?with_python3} |
---|
64 | %py3_build |
---|
65 | pushd build/lib/pycparser |
---|
66 | %{__python3} _build_tables.py |
---|
67 | popd |
---|
68 | %endif # with_python3 |
---|
69 | |
---|
70 | |
---|
71 | %install |
---|
72 | %py2_install |
---|
73 | |
---|
74 | %if 0%{?with_python3} |
---|
75 | %py3_install |
---|
76 | %endif # with_python3 |
---|
77 | |
---|
78 | |
---|
79 | %check |
---|
80 | #%{__python2} tests/all_tests.py |
---|
81 | %if 0%{?with_python3} |
---|
82 | #%{__python3} tests/all_tests.py |
---|
83 | %endif # with_python3 |
---|
84 | |
---|
85 | |
---|
86 | %files |
---|
87 | %license LICENSE |
---|
88 | %doc examples |
---|
89 | %{python_sitelib}/pycparser/ |
---|
90 | %{python_sitelib}/pycparser-*.egg-info |
---|
91 | |
---|
92 | %if 0%{?with_python3} |
---|
93 | %files -n python3-pycparser |
---|
94 | %license LICENSE |
---|
95 | %doc examples |
---|
96 | %{python3_sitelib}/pycparser/ |
---|
97 | %{python3_sitelib}/pycparser-*.egg-info |
---|
98 | %endif # with_python3 |
---|
99 | |
---|
100 | |
---|
101 | %changelog |
---|
102 | * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.20-1 |
---|
103 | - new upstream release. |
---|
104 | |
---|
105 | * Mon Nov 19 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.19-1 |
---|
106 | - initial build for Vine Linux. |
---|
107 | - new upstream release. |
---|
108 | |
---|
109 | * Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.14-15 |
---|
110 | - Rebuilt for Python 3.7 |
---|
111 | |
---|
112 | * Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.14-14 |
---|
113 | - Update Python 2 dependency declarations to new packaging standards |
---|
114 | (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) |
---|
115 | |
---|
116 | * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-13 |
---|
117 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
---|
118 | |
---|
119 | * Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 2.14-12 |
---|
120 | - Cleanup spec file conditionals |
---|
121 | |
---|
122 | * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-11 |
---|
123 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
---|
124 | |
---|
125 | * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-10 |
---|
126 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
---|
127 | |
---|
128 | * Fri Jan 6 2017 Orion Poplawski <orion@cora.nwra.com> - 2.14-9 |
---|
129 | - Ship python2-pycparser |
---|
130 | - Modernize spec |
---|
131 | |
---|
132 | * Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.14-8 |
---|
133 | - Rebuild for Python 3.6 |
---|
134 | |
---|
135 | * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-7 |
---|
136 | - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages |
---|
137 | |
---|
138 | * Fri Jul 8 2016 Tom Callaway <spot@fedoraproject.org> - 2.14-6 |
---|
139 | - rebuild to update yacctab.py |
---|
140 | |
---|
141 | * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-5 |
---|
142 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild |
---|
143 | |
---|
144 | * Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 2.14-4 |
---|
145 | - Rebuilt for Python3.5 rebuild |
---|
146 | |
---|
147 | * Tue Jul 14 2015 Stephen Gallagher <sgallagh@redhat.com> - 2.14-3 |
---|
148 | - Rebuild alongside python-ply 3.6 |
---|
149 | |
---|
150 | * Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-2 |
---|
151 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild |
---|
152 | |
---|
153 | * Tue Jun 09 2015 Nathaniel McCallum <npmccallum@redhat.com> - 2.14-1 |
---|
154 | - Update to 2.14 |
---|
155 | |
---|
156 | * Wed Aug 20 2014 Eric Smith <brouhaha@fedoraproject.org> 2.10-1 |
---|
157 | - Update to latest upstream. |
---|
158 | |
---|
159 | * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-9 |
---|
160 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild |
---|
161 | |
---|
162 | * Mon May 12 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.09.1-8 |
---|
163 | - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 |
---|
164 | |
---|
165 | * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-7 |
---|
166 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild |
---|
167 | |
---|
168 | * Tue Jul 23 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-6 |
---|
169 | - Added Python 3 support. |
---|
170 | |
---|
171 | * Mon Jul 22 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-5 |
---|
172 | - Renumbered Fedora-specific Patch1 to Patch100 |
---|
173 | - Added new Patch1 to fix table generation when the build system |
---|
174 | already has a python-pycparser package installed. |
---|
175 | - Submitted Patch0 and Patch1 as upstream issues. |
---|
176 | - Added comments about patches. |
---|
177 | |
---|
178 | * Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-4 |
---|
179 | - Upstream repository is now on github. |
---|
180 | - Fix rpmlint strange-permission complaint. |
---|
181 | - Rename patches, Source1 to all start with pycparser-{version}, to |
---|
182 | simplify updating patches for future upstream releases. |
---|
183 | |
---|
184 | * Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-3 |
---|
185 | - Run _build_tables.py to build the lextab.py and yacctab.py; otherwise |
---|
186 | they have to be regenerated at runtime for no benefit. |
---|
187 | |
---|
188 | * Tue Mar 19 2013 Jos de Kloe <josdekloe@gmail.com> 2.09.1-2 |
---|
189 | - remove the embedded ply code |
---|
190 | |
---|
191 | * Fri Jan 18 2013 Scott Tsai <scottt.tw@gmail.com> 2.09.1-1 |
---|
192 | - upstream 2.09.1 |
---|