python-twisted: Update to 21.2.0, redo patches
authorJeffery To <jeffery.to@gmail.com>
Fri, 11 Jun 2021 22:18:50 +0000 (06:18 +0800)
committerJeffery To <jeffery.to@gmail.com>
Fri, 11 Jun 2021 22:18:50 +0000 (06:18 +0800)
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/python/python-twisted/Makefile
lang/python/python-twisted/patches/001-omit-tkconch.patch
lang/python/python-twisted/patches/002-omit-tests.patch

index 935f34b3686020b152b313ae01d1564300a47be8..b1bdb3ec29998e2f53262ea92fbe5b3f1b8b5600 100644 (file)
@@ -8,12 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-twisted
-PKG_VERSION:=20.3.0
-PKG_RELEASE:=3
+PKG_VERSION:=21.2.0
+PKG_RELEASE:=1
 
 PYPI_NAME:=Twisted
-PYPI_SOURCE_EXT:=tar.bz2
-PKG_HASH:=d72c55b5d56e176563b91d11952d13b01af8725c623e498db5507b6614fc1e10
+PKG_HASH:=77544a8945cf69b98d2946689bbe0c75de7d145cdf11f391dd487eae8fc95a12
 
 PKG_BUILD_DEPENDS:=libtirpc
 
@@ -33,13 +32,14 @@ define Package/python3-twisted
   TITLE:=Asynchronous networking framework
   URL:=https://twistedmatrix.com/
   DEPENDS:= \
-      +python3-light \
+      +python3 \
       +python3-attrs \
       +python3-automat \
       +python3-constantly \
       +python3-incremental \
       +python3-hyperlink \
-      +python3-setuptools \
+      +python3-pkg-resources \
+      +python3-typing-extensions \
       +python3-zope-interface
 endef
 
@@ -49,6 +49,10 @@ protocols. It contains a web server, numerous chat clients, chat servers,
 mail servers, and more.
 endef
 
+define Build/Configure
+       $(SED) 's/^version = attr: twisted.__version__$$$$/version = $(PKG_VERSION)/' $(PKG_BUILD_DIR)/setup.cfg
+endef
+
 define Py3Package/python3-twisted/filespec
 +|$(PYTHON3_PKG_DIR)
 -|$(PYTHON3_PKG_DIR)/twisted/conch/scripts/tkconch.py
index 4f376ed49ea5eda0818b6f11f9ebaaccbb653497..8aee0fd6be6e682991aed2bca89f04fedab1859e 100644 (file)
@@ -1,13 +1,13 @@
---- a/src/twisted/python/_setup.py
-+++ b/src/twisted/python/_setup.py
-@@ -151,7 +151,6 @@ _CONSOLE_SCRIPTS = [
-     "conch = twisted.conch.scripts.conch:run",
-     "mailmail = twisted.mail.scripts.mailmail: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",
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -98,7 +98,6 @@ console_scripts =
+       conch = twisted.conch.scripts.conch:run
+       mailmail = twisted.mail.scripts.mailmail: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
 --- a/src/twisted/python/twisted-completion.zsh
 +++ b/src/twisted/python/twisted-completion.zsh
 @@ -1,4 +1,4 @@
index 71501df142a3c4c0e300dd95cfe8788621e61e53..54397cc008b31f9c671127e42d2548e31cf29de3 100644 (file)
@@ -1,37 +1,20 @@
---- a/src/twisted/python/_setup.py
-+++ b/src/twisted/python/_setup.py
-@@ -177,11 +177,6 @@ class ConditionalExtension(Extension, ob
- # 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=[
-             "src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
-@@ -275,12 +270,11 @@ def getSetupArgs(extensions=_EXTENSIONS,
-         # PyHamcrest 1.10.0 is Python 3 only, but lacks package metadata that
-         # says so. This condition can be dropped when Twisted drops support for
-         # Python 2.7.
--        "PyHamcrest >= 1.9.0, != 1.10.0",
-         "attrs >= 19.2.0",
-     ]
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -90,6 +90,9 @@ osx_platform =
  
-     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,
-@@ -290,7 +284,7 @@ def getSetupArgs(extensions=_EXTENSIONS,
-         cmdclass=command_classes,
-         include_package_data=True,
-         exclude_package_data={
--            "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat"],
-+            "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat", "test/*"],
-         },
-         zip_safe=False,
-         extras_require=_EXTRAS_REQUIRE,
+ [options.packages.find]
+ where = src
++exclude = 
++      *.test
++      *.test.*
+ [options.entry_points]
+ console_scripts = 
+@@ -109,6 +112,7 @@ console_scripts =
+       *.pxi
+       *.pyx
+       build.bat
++      test/*
+ [flake8]
+ disable-noqa = True