ASR_BASE
Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/external/subpack/lang/python/python-parsley/Makefile b/external/subpack/lang/python/python-parsley/Makefile
new file mode 100644
index 0000000..cff3d3e
--- /dev/null
+++ b/external/subpack/lang/python/python-parsley/Makefile
@@ -0,0 +1,40 @@
+#
+# Copyright (C) 2015, 2017-2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-parsley
+PKG_VERSION:=1.3
+PKG_RELEASE:=6
+
+PYPI_NAME:=Parsley
+PKG_HASH:=9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-parsley
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Parsing and pattern matching
+ URL:=http://launchpad.net/parsley
+ DEPENDS:=+python3-light
+endef
+
+define Package/python3-parsley/description
+Parsing and pattern matching made easy.
+endef
+
+$(eval $(call Py3Package,python3-parsley))
+$(eval $(call BuildPackage,python3-parsley))
+$(eval $(call BuildPackage,python3-parsley-src))
diff --git a/external/subpack/lang/python/python-parsley/patches/001-py3-read-utf8.patch b/external/subpack/lang/python/python-parsley/patches/001-py3-read-utf8.patch
new file mode 100644
index 0000000..f3e63dc
--- /dev/null
+++ b/external/subpack/lang/python/python-parsley/patches/001-py3-read-utf8.patch
@@ -0,0 +1,19 @@
+--- a/setup.py
++++ b/setup.py
+@@ -4,6 +4,7 @@
+ Setup script for the Parsley distribution.
+ """
+
++import io
+ from distutils.core import setup
+ setup(
+ name="Parsley",
+@@ -13,7 +14,7 @@ setup(
+ author="Allen Short",
+ author_email="washort42@gmail.com",
+ license="MIT License",
+- long_description=open("README").read(),
++ long_description=io.open("README", encoding="utf-8").read(),
+ packages=["ometa", "terml", "ometa._generated", "terml._generated",
+ "ometa.test", "terml.test"],
+ py_modules=["parsley"]
diff --git a/external/subpack/lang/python/python-parsley/patches/002-omit-tests.patch b/external/subpack/lang/python/python-parsley/patches/002-omit-tests.patch
new file mode 100644
index 0000000..4fe43b8
--- /dev/null
+++ b/external/subpack/lang/python/python-parsley/patches/002-omit-tests.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -15,7 +15,6 @@ setup(
+ author_email="washort42@gmail.com",
+ license="MIT License",
+ long_description=io.open("README", encoding="utf-8").read(),
+- packages=["ometa", "terml", "ometa._generated", "terml._generated",
+- "ometa.test", "terml.test"],
++ packages=["ometa", "terml", "ometa._generated", "terml._generated"],
+ py_modules=["parsley"]
+ )