summaryrefslogtreecommitdiffstats
path: root/python-pycparser.spec
blob: bf04d670461cd8d637eb8c5892cc2d54f6e035a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Name:           python-pycparser
Version:        2.08
Release:        1%{?dist}
Summary:        C parser and AST generator written in Python

License:        BSD
URL:            http://code.google.com/p/pycparser/
Source0:        http://pycparser.googlecode.com/files/pycparser-%{version}.tar.gz
Source1:        remove-relative-sys-path

BuildArch:      noarch

# for unit tests
BuildRequires:  python-ply
BuildRequires:  dos2unix

Requires:  python-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.


%prep
%setup -q -n pycparser-%{version}

# examples
cp %SOURCE1 .
./remove-relative-sys-path examples
dos2unix LICENSE

%build
%{__python} setup.py build

%install
%{__python} setup.py install --skip-build --root %{buildroot}

%check
%{__python} tests/all_tests.py 
 
%files
%doc examples LICENSE
%{python_sitelib}/pycparser/
%{python_sitelib}/pycparser-*.egg-info

%changelog
* Tue Jun 18 2012 <scottt.tw@gmail.com> Scott Tsai 2.08-1
- upstream 2.08