summaryrefslogtreecommitdiffstats
path: root/python-pycparser.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-pycparser.spec')
-rw-r--r--python-pycparser.spec50
1 files changed, 50 insertions, 0 deletions
diff --git a/python-pycparser.spec b/python-pycparser.spec
new file mode 100644
index 0000000..cb29a93
--- /dev/null
+++ b/python-pycparser.spec
@@ -0,0 +1,50 @@
+Name: python-pycparser
+Version: 2.07
+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-2.07.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
+find examples -type f -exec dos2unix '{}' ';'
+cp %SOURCE1 .
+./remove-relative-sys-path examples
+
+%build
+%{__python} setup.py build
+
+%install
+%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+
+%check
+%{__python} tests/all_tests.py
+
+%files
+%doc examples
+# For noarch packages: sitelib
+%{python_sitelib}/*
+
+
+%changelog
+* Tue Jun 18 2012 <scottt.tw@gmail.com> Scott Tsai 2.07-1
+- upstream 2.07