Browse Source

python-twisted: Update to 21.2.0, redo patches

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lilik-openwrt-22.03
Jeffery To 3 years ago
parent
commit
4b6e05d1fd
No known key found for this signature in database GPG Key ID: C616D9E719E868E4
3 changed files with 39 additions and 52 deletions
  1. +10
    -6
      lang/python/python-twisted/Makefile
  2. +10
    -10
      lang/python/python-twisted/patches/001-omit-tkconch.patch
  3. +19
    -36
      lang/python/python-twisted/patches/002-omit-tests.patch

+ 10
- 6
lang/python/python-twisted/Makefile View 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


+ 10
- 10
lang/python/python-twisted/patches/001-omit-tkconch.patch View 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 @@


+ 19
- 36
lang/python/python-twisted/patches/002-omit-tests.patch View 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

Loading…
Cancel
Save