Update to latest upstream.

This commit is contained in:
Eric Smith 2014-08-20 12:58:28 -06:00
parent 51a5642588
commit ff308dee88
7 changed files with 48 additions and 90 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/release_v2.09.1.tar.gz
/release_v2.10.tar.gz

View File

@ -1,38 +0,0 @@
diff -Naur eliben-pycparser-82ace14bb612/pycparser/c_lexer.py eliben-pycparser-82ace14bb612.modified/pycparser/c_lexer.py
--- eliben-pycparser-82ace14bb612/pycparser/c_lexer.py 2012-12-29 14:22:23.000000000 +0100
+++ eliben-pycparser-82ace14bb612.modified/pycparser/c_lexer.py 2013-03-19 23:15:05.074797841 +0100
@@ -9,8 +9,8 @@
import re
import sys
-from .ply import lex
-from .ply.lex import TOKEN
+from ply import lex
+from ply.lex import TOKEN
class CLexer(object):
diff -Naur eliben-pycparser-82ace14bb612/pycparser/c_parser.py eliben-pycparser-82ace14bb612.modified/pycparser/c_parser.py
--- eliben-pycparser-82ace14bb612/pycparser/c_parser.py 2012-12-29 14:22:23.000000000 +0100
+++ eliben-pycparser-82ace14bb612.modified/pycparser/c_parser.py 2013-03-19 23:15:20.338751658 +0100
@@ -8,7 +8,7 @@
#------------------------------------------------------------------------------
import re
-from .ply import yacc
+from ply import yacc
from . import c_ast
from .c_lexer import CLexer
diff -Naur eliben-pycparser-82ace14bb612/setup.py eliben-pycparser-82ace14bb612.modified/setup.py
--- eliben-pycparser-82ace14bb612/setup.py 2012-12-29 14:22:23.000000000 +0100
+++ eliben-pycparser-82ace14bb612.modified/setup.py 2013-03-19 23:14:48.861850227 +0100
@@ -22,7 +22,7 @@
classifiers = [
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',],
- packages=['pycparser', 'pycparser.ply'],
+ packages=['pycparser'],
package_data={'pycparser': ['*.cfg']},
)

View File

@ -1,12 +0,0 @@
diff -up pycparser-release_v2.09.1/pycparser/_build_tables.py.tables-sys-path pycparser-release_v2.09.1/pycparser/_build_tables.py
--- pycparser-release_v2.09.1/pycparser/_build_tables.py.tables-sys-path 2013-07-22 13:17:44.950531002 -0600
+++ pycparser-release_v2.09.1/pycparser/_build_tables.py 2013-07-22 13:18:29.188526142 -0600
@@ -17,7 +17,7 @@ ast_gen = ASTCodeGenerator('_c_ast.cfg')
ast_gen.generate(open('c_ast.py', 'w'))
import sys
-sys.path.extend(['.', '..'])
+sys.path[0:0] = ['.', '..']
from pycparser import c_parser
# Generates the tables

View File

@ -1,24 +0,0 @@
# HG changeset patch
# User Scott Tsai <scottt.tw@gmail.com>
# Date 1358446261 -28800
# Node ID 12aa73c5da595a08f587c14a74e84bf72f0bf7a0
# Parent a46039840b0ed8466bebcddae9d4f1df60d3bc98
tests/all_tests.py: add local paths to the front of sys.path
While doing pycparser development on a machine that already has an
older version of pycparser installed, we want unit tests to run against
the local copy instead of the system wide copy of pycparser.
This patch adds '.' and '..' to the front of sys.path instead of the back.
diff --git a/tests/all_tests.py b/tests/all_tests.py
--- a/tests/all_tests.py
+++ b/tests/all_tests.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import sys
-sys.path.extend(['.', '..'])
+sys.path[0:0] = ['.', '..']
import unittest

38
pycparser-2.10-ply.patch Normal file
View File

@ -0,0 +1,38 @@
diff -up pycparser-release_v2.10/pycparser/c_lexer.py.ply pycparser-release_v2.10/pycparser/c_lexer.py
--- pycparser-release_v2.10/pycparser/c_lexer.py.ply 2013-08-03 07:15:32.000000000 -0600
+++ pycparser-release_v2.10/pycparser/c_lexer.py 2014-08-20 12:40:48.308461164 -0600
@@ -9,8 +9,8 @@
import re
import sys
-from .ply import lex
-from .ply.lex import TOKEN
+from ply import lex
+from ply.lex import TOKEN
class CLexer(object):
diff -up pycparser-release_v2.10/pycparser/c_parser.py.ply pycparser-release_v2.10/pycparser/c_parser.py
--- pycparser-release_v2.10/pycparser/c_parser.py.ply 2013-08-03 07:15:32.000000000 -0600
+++ pycparser-release_v2.10/pycparser/c_parser.py 2014-08-20 12:40:05.154894980 -0600
@@ -8,7 +8,7 @@
#------------------------------------------------------------------------------
import re
-from .ply import yacc
+from ply import yacc
from . import c_ast
from .c_lexer import CLexer
diff -up pycparser-release_v2.10/setup.py.ply pycparser-release_v2.10/setup.py
--- pycparser-release_v2.10/setup.py.ply 2013-08-03 07:15:32.000000000 -0600
+++ pycparser-release_v2.10/setup.py 2014-08-20 12:40:05.154894980 -0600
@@ -22,7 +22,7 @@ setup(
classifiers = [
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',],
- packages=['pycparser', 'pycparser.ply'],
+ packages=['pycparser'],
package_data={'pycparser': ['*.cfg']},
)

View File

@ -1,4 +1,4 @@
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
%if 0%{?fedora} > 12
%global with_python3 1
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
@ -6,23 +6,15 @@
Name: python-pycparser
Summary: C parser and AST generator written in Python
Version: 2.09.1
Release: 9%{?dist}
Version: 2.10
Release: 1%{?dist}
License: BSD
Group: System Environment/Libraries
URL: http://github.com/eliben/pycparser
Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz
Source1: pycparser-0.91.1-remove-relative-sys-path.py
Patch0: pycparser-0.91.1-unittests-sys-path.patch
# Submitted as upstream issue #11:
# https://github.com/eliben/pycparser/issues/11
Patch1: pycparser-0.91.1-tables-sys-path.patch
# Submitted as upstream issue #12:
# https://github.com/eliben/pycparser/issues/12
Patch100: pycparser-0.91.1-disable-embedded-ply.patch
Patch100: pycparser-2.10-ply.patch
# This is Fedora-specific; I don't think we should request upstream to
# remove embedded libraries from their distribuution, when we can remove
# them during packaging.
@ -62,9 +54,7 @@ need to parse C source code.
%prep
%setup -q -n pycparser-release_v%{version}
%patch0 -p1 -b .unittests-sys-path
%patch1 -p1 -b .tables-sys-path
%patch100 -p1 -b .orig
%patch100 -p1 -b .ply
# remove embedded copy of ply
rm -rf pycparser/ply
@ -124,6 +114,9 @@ popd
%endif # with_python3
%changelog
* Wed Aug 20 2014 Eric Smith <brouhaha@fedoraproject.org> 2.10-1
- Update to latest upstream.
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

View File

@ -1 +1 @@
b6a3be32513fd0d5d9acce2619abdf98 release_v2.09.1.tar.gz
82ab1fa524198908050550e7780b85e1 release_v2.10.tar.gz