Merge pull request #5409 from jefferyto/python-parsley-py3
python-parsley: add python3 variant
This commit is contained in:
commit
970f7c2f07
3 changed files with 64 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2015 OpenWrt.org
|
# Copyright (C) 2015, 2017-2018 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -7,37 +7,67 @@
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=Parsley
|
PKG_NAME:=python-parsley
|
||||||
PKG_VERSION:=1.3
|
PKG_VERSION:=1.3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=Parsley-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/Parsley
|
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/Parsley
|
||||||
PKG_HASH:=9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41
|
PKG_HASH:=9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41
|
||||||
|
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-parsley-$(PKG_VERSION)
|
||||||
|
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
$(call include_mk, python-package.mk)
|
$(call include_mk, python-package.mk)
|
||||||
|
$(call include_mk, python3-package.mk)
|
||||||
|
|
||||||
|
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
|
||||||
|
|
||||||
|
define Package/python-parsley/Default
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
SUBMENU:=Python
|
||||||
|
URL:=http://launchpad.net/parsley
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/python-parsley
|
define Package/python-parsley
|
||||||
SECTION:=lang
|
$(call Package/python-parsley/Default)
|
||||||
CATEGORY:=Languages
|
TITLE:=python-parsley
|
||||||
SUBMENU:=Python
|
DEPENDS:=+PACKAGE_python-parsley:python-light
|
||||||
TITLE:=python-parsley
|
VARIANT:=python
|
||||||
URL:=http://launchpad.net/parsley
|
endef
|
||||||
DEPENDS:=+python-light
|
|
||||||
|
define Package/python3-parsley
|
||||||
|
$(call Package/python-parsley/Default)
|
||||||
|
TITLE:=python3-parsley
|
||||||
|
DEPENDS:=+PACKAGE_python3-parsley:python3-light
|
||||||
|
VARIANT:=python3
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/python-parsley/description
|
define Package/python-parsley/description
|
||||||
Parsing and pattern matching made easy.
|
Parsing and pattern matching made easy.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Package/python3-parsley/description
|
||||||
|
$(call Package/python-parsley/description)
|
||||||
|
.
|
||||||
|
(Variant for Python3)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define PyBuild/Compile
|
||||||
$(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
|
$(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Py3Build/Compile
|
||||||
|
$(call Build/Compile/Py3Mod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
|
||||||
|
endef
|
||||||
|
|
||||||
$(eval $(call PyPackage,python-parsley))
|
$(eval $(call PyPackage,python-parsley))
|
||||||
$(eval $(call BuildPackage,python-parsley))
|
$(eval $(call BuildPackage,python-parsley))
|
||||||
|
|
||||||
|
$(eval $(call Py3Package,python3-parsley))
|
||||||
|
$(eval $(call BuildPackage,python3-parsley))
|
||||||
|
|
19
lang/python/python-parsley/patches/001-py3-read-utf8.patch
Normal file
19
lang/python/python-parsley/patches/001-py3-read-utf8.patch
Normal file
|
@ -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"]
|
|
@ -1,10 +1,9 @@
|
||||||
diff -Nur a/setup.py b/setup.py
|
--- a/setup.py
|
||||||
--- a/setup.py 2015-09-09 10:45:25.000000000 +0800
|
+++ b/setup.py
|
||||||
+++ b/setup.py 2015-12-01 17:31:03.143409843 +0800
|
@@ -15,7 +15,6 @@ setup(
|
||||||
@@ -14,7 +14,6 @@
|
|
||||||
author_email="washort42@gmail.com",
|
author_email="washort42@gmail.com",
|
||||||
license="MIT License",
|
license="MIT License",
|
||||||
long_description=open("README").read(),
|
long_description=io.open("README", encoding="utf-8").read(),
|
||||||
- packages=["ometa", "terml", "ometa._generated", "terml._generated",
|
- packages=["ometa", "terml", "ometa._generated", "terml._generated",
|
||||||
- "ometa.test", "terml.test"],
|
- "ometa.test", "terml.test"],
|
||||||
+ packages=["ometa", "terml", "ometa._generated", "terml._generated"],
|
+ packages=["ometa", "terml", "ometa._generated", "terml._generated"],
|
Loading…
Reference in a new issue