From 7962d2fe934ca6704facedca0d306d0c530bfee3 Mon Sep 17 00:00:00 2001 From: Sarah Guermond Date: Sun, 1 Oct 2017 22:28:24 -0700 Subject: [PATCH 1/4] Removed importlib from install requirements --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2dc432e..8edb344 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ scripts=[], description="text parsing & processing tool", long_description=long_description, - install_requires=['py3compat', 'importlib'], + install_requires=['py3compat'], classifiers=[ 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)', 'Development Status :: 4 - Beta', From 83e8aeaffb1314632245f739845c84f342aa72ae Mon Sep 17 00:00:00 2001 From: Sarah Guermond Date: Sun, 1 Oct 2017 22:44:50 -0700 Subject: [PATCH 2/4] Remove PKG-INFO file, should get auto-generated during setup --- PKG-INFO | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 PKG-INFO diff --git a/PKG-INFO b/PKG-INFO deleted file mode 100644 index 534367d..0000000 --- a/PKG-INFO +++ /dev/null @@ -1,23 +0,0 @@ -Metadata-Version: 1.1 -Name: pijnu -Version: 20130124 -Summary: text parsing & processing tool -Home-page: http://www.github.com/peter17/pijnu -Author: Peter Potrowl -Author-email: peter.potrowl@gmail.com -License: LGPL v3 -Description: 'pijnu' is - * a parsing language extended from PEG, - * a parser generator for grammars written using this language, - * a tool to help processing processing parse results. - - 'pijnu' is intended to be clear, easy, practical. - -Platform: Any -Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) -Classifier: Development Status :: 4 - Beta -Classifier: Topic :: Software Development -Classifier: Topic :: Text Processing -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Classifier: Intended Audience :: Developers -Classifier: Programming Language :: Python From 6c6897431ea0402ee90fb56c4a0a82df91f474f1 Mon Sep 17 00:00:00 2001 From: Sarah Guermond Date: Sun, 1 Oct 2017 23:00:01 -0700 Subject: [PATCH 3/4] Add pip installation instructions to Readme --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rst b/README.rst index d6c1edf..c5e01e0 100644 --- a/README.rst +++ b/README.rst @@ -81,6 +81,13 @@ Another example that will generate XHTML from wiki-text styled lines (possibly n The column on right side assigns transformations to patterns. `drop`, `join`, and `liftValue` are builtin. `styledSpan` is a custom transformation. `'@'` denotes a recursive pattern. +Installation +------------ + +``` +pip install -e git+https://github.com/peter17/pijnu#egg=pijnu +``` + Practical use ------------- From 255f0d4c36bc30b9d1f81225f1f0d0d12295b485 Mon Sep 17 00:00:00 2001 From: Sarah Guermond Date: Mon, 2 Oct 2017 00:08:47 -0700 Subject: [PATCH 4/4] Catch encoding mismatch before writing to file --- pijnu/library/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pijnu/library/tools.py b/pijnu/library/tools.py index 02ca57a..d208dd4 100644 --- a/pijnu/library/tools.py +++ b/pijnu/library/tools.py @@ -295,5 +295,5 @@ def writeFile(filename, text): ''' Write -- or overwrite -- text into file. -- No error if file exists ''' f = open(filename, 'w') - f.write(text) + f.write(text.decode('utf-8')) f.close()