diff --git a/lang/python/twisted/Makefile b/lang/python/twisted/Makefile index 47811726f..36c1a779d 100644 --- a/lang/python/twisted/Makefile +++ b/lang/python/twisted/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2011, 2015-2016 OpenWrt.org +# Copyright (C) 2006-2011, 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,15 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=twisted -PKG_VERSION:=16.4.1 -PKG_RELEASE:=2 +PKG_VERSION:=17.9.0 +PKG_RELEASE:=1 PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://pypi.python.org/packages/6b/23/8dbe86fc83215015e221fbd861a545c6ec5c9e9cd7514af114d1f64084ab \ - http://twistedmatrix.com/Releases/Twisted/16.4 -PKG_HASH:=1d8d73f006c990744effb35588359fd44d43608649ac0b6b7edc71176e88e816 +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/T/Twisted +PKG_HASH:=0da1a7e35d5fcae37bc9c7978970b5feb3bc82822155b8654ec63925c05af75c -PKG_BUILD_DIR:=$(BUILD_DIR)/Twisted-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-twisted-$(PKG_VERSION) PKG_BUILD_DEPENDS:=USE_MUSL:librpc PKG_LICENSE:=MIT @@ -26,33 +25,40 @@ PKG_MAINTAINER:=Jeffery To include $(INCLUDE_DIR)/package.mk include ../python-package.mk -define Package/twisted +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xjf $(DL_DIR)/$(PKG_SOURCE) + +define Package/twisted/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - TITLE:=Python networking engine URL:=http://twistedmatrix.com/ - DEPENDS:=+python-light +python-zope-interface +endef + +define Package/twisted +$(call Package/twisted/Default) + TITLE:=Python networking engine + DEPENDS:= \ + +PACKAGE_twisted:python-light \ + +PACKAGE_twisted:python-automat \ + +PACKAGE_twisted:python-constantly \ + +PACKAGE_twisted:python-incremental \ + +PACKAGE_twisted:python-hyperlink \ + +PACKAGE_twisted:python-zope-interface + VARIANT:=python endef define Package/twisted/description - Twisted is a networking engine written in Python, supporting numerous - protocols. It contains a web server, numerous chat clients, chat servers, - mail servers, and more. +Twisted is a networking engine written in Python, supporting numerous +protocols. It contains a web server, numerous chat clients, chat servers, +mail servers, and more. endef define PyPackage/twisted/filespec +|/usr/bin --|/usr/bin/tkconch +|$(PYTHON_PKG_DIR) -|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py endef -define Build/Compile - $(call Build/Compile/PyMod,, \ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --no-compile, \ - ) -endef - $(eval $(call PyPackage,twisted)) $(eval $(call BuildPackage,twisted)) +$(eval $(call BuildPackage,twisted-src)) diff --git a/lang/python/twisted/patches/001-fix-zsh-completion.patch b/lang/python/twisted/patches/001-fix-zsh-completion.patch deleted file mode 100644 index 6cb85c609..000000000 --- a/lang/python/twisted/patches/001-fix-zsh-completion.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/twisted/python/twisted-completion.zsh b/twisted/python/twisted-completion.zsh -index 4d97aa5..9a8d4d8 100644 ---- a/twisted/python/twisted-completion.zsh -+++ b/twisted/python/twisted-completion.zsh -@@ -1,4 +1,4 @@ --#compdef twistd trial conch cftp ckeygen pyhtmlizer tkconch -+#compdef twistd trial conch cftp ckeygen pyhtmlizer - # - # This is the ZSH completion file for Twisted commands. It calls the current - # command-line with the special "--_shell-completion" option which is handled diff --git a/lang/python/twisted/patches/001-omit-tkconch-patch b/lang/python/twisted/patches/001-omit-tkconch-patch new file mode 100644 index 000000000..05ad4c8d6 --- /dev/null +++ b/lang/python/twisted/patches/001-omit-tkconch-patch @@ -0,0 +1,22 @@ +diff --git a/src/twisted/python/_setup.py b/src/twisted/python/_setup.py +index 3b5f69d4b..c69c5d13c 100644 +--- a/src/twisted/python/_setup.py ++++ b/src/twisted/python/_setup.py +@@ -142,7 +142,6 @@ _CONSOLE_SCRIPTS = [ + "cftp = twisted.conch.scripts.cftp:run", + "conch = twisted.conch.scripts.conch:run", + "pyhtmlizer = twisted.scripts.htmlizer:run", +- "tkconch = twisted.conch.scripts.tkconch:run", + "trial = twisted.scripts.trial:run", + "twist = twisted.application.twist._twist:Twist.main", + "twistd = twisted.scripts.twistd:run", +diff --git a/src/twisted/python/twisted-completion.zsh b/src/twisted/python/twisted-completion.zsh +index 4d97aa5d3..9a8d4d82e 100644 +--- a/src/twisted/python/twisted-completion.zsh ++++ b/src/twisted/python/twisted-completion.zsh +@@ -1,4 +1,4 @@ +-#compdef twistd trial conch cftp ckeygen pyhtmlizer tkconch ++#compdef twistd trial conch cftp ckeygen pyhtmlizer + # + # This is the ZSH completion file for Twisted commands. It calls the current + # command-line with the special "--_shell-completion" option which is handled diff --git a/lang/python/twisted/patches/002-omit-tests.patch b/lang/python/twisted/patches/002-omit-tests.patch index 8d545bfd6..464962010 100644 --- a/lang/python/twisted/patches/002-omit-tests.patch +++ b/lang/python/twisted/patches/002-omit-tests.patch @@ -1,41 +1,33 @@ -diff --git a/setup.py b/setup.py -index e21ef70..a4d9ee8 100755 ---- a/setup.py -+++ b/setup.py -@@ -55,13 +55,14 @@ def main(args): - setup_args = STATIC_PACKAGE_METADATA.copy() +diff --git a/src/twisted/python/_setup.py b/src/twisted/python/_setup.py +index 3b5f69d4b..2dca47aa5 100644 +--- a/src/twisted/python/_setup.py ++++ b/src/twisted/python/_setup.py +@@ -175,11 +175,6 @@ class ConditionalExtension(Extension, object): - setup_args.update(dict( -- packages=setuptools.find_packages(), -+ packages=setuptools.find_packages(exclude=["*.test", "*.test.*"]), + # The C extensions used for Twisted. + _EXTENSIONS = [ +- ConditionalExtension( +- "twisted.test.raiser", +- sources=["src/twisted/test/raiser.c"], +- condition=lambda _: _isCPython), +- + ConditionalExtension( + "twisted.internet.iocpreactor.iocpsupport", + sources=[ +@@ -232,7 +227,7 @@ def getSetupArgs(extensions=_EXTENSIONS): + requirements.append("hyperlink >= 17.1.1") + + arguments.update(dict( +- packages=find_packages("src"), ++ packages=find_packages("src", exclude=["*.test", "*.test.*"]), + use_incremental=True, + setup_requires=["incremental >= 16.10.1"], install_requires=requirements, - conditionalExtensions=getExtensions(), - entry_points={ - 'console_scripts': getConsoleScripts() +@@ -241,6 +236,7 @@ def getSetupArgs(extensions=_EXTENSIONS): }, + cmdclass=command_classes, include_package_data=True, + exclude_package_data={'':['test/*']}, zip_safe=False, extras_require=_EXTRAS_REQUIRE, - )) -diff --git a/twisted/python/dist.py b/twisted/python/dist.py -index dfff9dc..a05b716 100644 ---- a/twisted/python/dist.py -+++ b/twisted/python/dist.py -@@ -191,11 +191,11 @@ def getExtensions(): - Get the C extensions used for Twisted. - """ - extensions = [ -- ConditionalExtension( -- "twisted.test.raiser", -- ["twisted/test/raiser.c"], -- condition=lambda _: _isCPython -- ), -+ #ConditionalExtension( -+ # "twisted.test.raiser", -+ # ["twisted/test/raiser.c"], -+ # condition=lambda _: _isCPython -+ #), - ConditionalExtension( - "twisted.internet.iocpreactor.iocpsupport", - ["twisted/internet/iocpreactor/iocpsupport/iocpsupport.c", + package_dir={"": "src"},