diff options
author | Eli Bendersky <eliben@gmail.com> | 2013-08-03 06:07:08 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2013-08-03 06:07:08 -0700 |
commit | 8dbd1491cfff6b3b5bfec210b0d6cbf099185602 (patch) | |
tree | d6c44419cab711326c7138413ac6d395e02c6e05 | |
parent | febd20be590917df25d108cd3347da9b5a49a852 (diff) | |
download | pycparser-8dbd1491cfff6b3b5bfec210b0d6cbf099185602.tar.gz |
Bump version to 2.10 and do some whitespace cleanups.
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | MANIFEST.in | 24 | ||||
-rw-r--r-- | TODO.txt | 72 | ||||
-rw-r--r-- | pycparser/__init__.py | 16 | ||||
-rw-r--r-- | setup.py | 58 |
5 files changed, 86 insertions, 86 deletions
@@ -1,4 +1,4 @@ -+ Version 2.10 (??) ++ Version 2.10 (03.08.2013) - A number of improvements in the handling of typedef-name ambiguities, contributed by Sye van der Veen in GitHub issue #1: diff --git a/MANIFEST.in b/MANIFEST.in index 4dcf1a8..b8d22eb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,12 +1,12 @@ -recursive-include examples *.c *.h *.py
-recursive-include tests *.c *.h *.py
-recursive-include pycparser *.py *.cfg
-include utils/*.exe
-include utils/fake_libc_include/*.h
-include README.*
-include LICENSE
-include CHANGES
-include setup.*
-
-recursive-exclude tests yacctab.* lextab.*
-recursive-exclude examples yacctab.* lextab.*
+recursive-include examples *.c *.h *.py +recursive-include tests *.c *.h *.py +recursive-include pycparser *.py *.cfg +include utils/*.exe +include utils/fake_libc_include/*.h +include README.* +include LICENSE +include CHANGES +include setup.* + +recursive-exclude tests yacctab.* lextab.* +recursive-exclude examples yacctab.* lextab.* @@ -1,36 +1,36 @@ -Todo
-----
-
-
-Changes since last
-------------------
-
-* <write directly in CHANGES!>
-
-Version Update
---------------
-
-setup.py, __init__.py, README.txt, CHANGES
-- Make sure _build_tables was run in pycparser/ and the tables are in the
- MANIFEST
-- Tag in hg
-- If PLY version changes, note it in README and ply/LICENSE
-
-python setup.py sdist upload
-
-Misc
-----
-
-yacc optimization:
-- If parsetab.py/pyc doesn't exist in the path, the table will be reconstructed anyway, regardless of the optimize parameter
-- If it does exist:
- - If optimize=True, the table will be loaded unconditionally
- - If optimize=False, the table will be loaded only if it's older than the grammar
-
-lex optimization:
-- If optimize=False, the lexical table is re-computed and is not saved to a lextab file
-- If optimize=True:
- - If lextab.py/pyc exists in the path, it will be loaded unconditionally
- - If lextab.py/pyc doesn't exist, it will be created and loaded
-
-
+Todo +---- + + +Changes since last +------------------ + +* <write directly in CHANGES!> + +Version Update +-------------- + +setup.py, __init__.py, README.txt, CHANGES +- Make sure _build_tables was run in pycparser/ and the tables are in the + MANIFEST +- Tag in git +- If PLY version changes, note it in README and ply/LICENSE + +python setup.py sdist upload + +Misc +---- + +yacc optimization: +- If parsetab.py/pyc doesn't exist in the path, the table will be reconstructed anyway, regardless of the optimize parameter +- If it does exist: + - If optimize=True, the table will be loaded unconditionally + - If optimize=False, the table will be loaded only if it's older than the grammar + +lex optimization: +- If optimize=False, the lexical table is re-computed and is not saved to a lextab file +- If optimize=True: + - If lextab.py/pyc exists in the path, it will be loaded unconditionally + - If lextab.py/pyc doesn't exist, it will be created and loaded + + diff --git a/pycparser/__init__.py b/pycparser/__init__.py index ac77aa9..86d1c5c 100644 --- a/pycparser/__init__.py +++ b/pycparser/__init__.py @@ -1,14 +1,14 @@ #----------------------------------------------------------------- # pycparser: __init__.py # -# This package file exports some convenience functions for +# This package file exports some convenience functions for # interacting with pycparser # # Copyright (C) 2008-2012, Eli Bendersky # License: BSD #----------------------------------------------------------------- __all__ = ['c_lexer', 'c_parser', 'c_ast'] -__version__ = '2.09.1' +__version__ = '2.10' from subprocess import Popen, PIPE from .c_parser import CParser @@ -26,12 +26,12 @@ def preprocess_file(filename, cpp_path='cpp', cpp_args=''): arguments. When successful, returns the preprocessed file's contents. - Errors from cpp will be printed out. + Errors from cpp will be printed out. """ path_list = [cpp_path] if isinstance(cpp_args, list): path_list += cpp_args - elif cpp_args != '': + elif cpp_args != '': path_list += [cpp_args] path_list += [filename] @@ -39,8 +39,8 @@ def preprocess_file(filename, cpp_path='cpp', cpp_args=''): # Note the use of universal_newlines to treat all newlines # as \n for Python's purpose # - pipe = Popen( path_list, - stdout=PIPE, + pipe = Popen( path_list, + stdout=PIPE, universal_newlines=True) text = pipe.communicate()[0] except OSError as e: @@ -77,10 +77,10 @@ def parse_file(filename, use_cpp=False, cpp_path='cpp', cpp_args='', parser: Optional parser object to be used instead of the default CParser - When successful, an AST is returned. ParseError can be + When successful, an AST is returned. ParseError can be thrown if the file doesn't parse successfully. - Errors from cpp will be printed out. + Errors from cpp will be printed out. """ if use_cpp: text = preprocess_file(filename, cpp_path, cpp_args) @@ -1,29 +1,29 @@ -import os, sys
-from distutils.core import setup
-
-
-setup(
- # metadata
- name='pycparser',
- description='C parser in Python',
- long_description="""
- pycparser is a complete parser of the C language, written in
- pure Python using the PLY parsing library.
- It parses C code into an AST and can serve as a front-end for
- C compilers or analysis tools.
- """,
- license='BSD',
- version='2.09.1',
- author='Eli Bendersky',
- maintainer='Eli Bendersky',
- author_email='eliben@gmail.com',
- url='https://github.com/eliben/pycparser',
- platforms='Cross Platform',
- classifiers = [
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 3',],
- packages=['pycparser', 'pycparser.ply'],
- package_data={'pycparser': ['*.cfg']},
-)
-
-
+import os, sys +from distutils.core import setup + + +setup( + # metadata + name='pycparser', + description='C parser in Python', + long_description=""" + pycparser is a complete parser of the C language, written in + pure Python using the PLY parsing library. + It parses C code into an AST and can serve as a front-end for + C compilers or analysis tools. + """, + license='BSD', + version='2.10', + author='Eli Bendersky', + maintainer='Eli Bendersky', + author_email='eliben@gmail.com', + url='https://github.com/eliben/pycparser', + platforms='Cross Platform', + classifiers = [ + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 3',], + packages=['pycparser', 'pycparser.ply'], + package_data={'pycparser': ['*.cfg']}, +) + + |