From 5c1547dbe43b5d5d5273cd66d91fcd1ea674a88a Mon Sep 17 00:00:00 2001 From: Tom Briden Date: Fri, 17 Sep 2021 09:09:54 +0100 Subject: [PATCH] python-xcaplib: remove unneeded patch to fix build --- .../python-xcaplib-work-with-eventlib.patch | 70 ------------------- .../python-xcaplib-2.0.1.exheres-0 | 4 -- 2 files changed, 74 deletions(-) delete mode 100644 packages/dev-python/python-xcaplib/files/python-xcaplib-work-with-eventlib.patch diff --git a/packages/dev-python/python-xcaplib/files/python-xcaplib-work-with-eventlib.patch b/packages/dev-python/python-xcaplib/files/python-xcaplib-work-with-eventlib.patch deleted file mode 100644 index 72abf1c..0000000 --- a/packages/dev-python/python-xcaplib/files/python-xcaplib-work-with-eventlib.patch +++ /dev/null @@ -1,70 +0,0 @@ -Upstream: Yes -Source: https://github.com/AGProjects/python3-xcaplib/commit/066759cf355b152375767bee4c3858dc0b8087e4 - -From 066759cf355b152375767bee4c3858dc0b8087e4 Mon Sep 17 00:00:00 2001 -From: Worawut Boonpeang -Date: Fri, 4 Dec 2020 13:49:54 +0000 -Subject: [PATCH] xcaplib (Python3) work with eventlib - ---- - xcaplib/green.py | 4 +++- - xcaplib/xcapclient.py | 10 ++++++++-- - 2 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/xcaplib/green.py b/xcaplib/green.py -index 237d9d8..d01ee11 100644 ---- a/xcaplib/green.py -+++ b/xcaplib/green.py -@@ -2,6 +2,8 @@ - from eventlib.green import socket, ssl, httplib, urllib2 - from xcaplib import httpclient - from xcaplib import client -+import urllib -+import http - - - class HTTPConnection(httplib.HTTPConnection): -@@ -22,7 +24,7 @@ def http_open(self, req): - - class HTTPSHandler(urllib.request.HTTPSHandler): - def https_open(self, req): -- return self.do_open(HTTPSConnection, req) -+ return self.do_open(http.client.HTTPSConnection, req) - - - class HTTPClient(httpclient.HTTPClient): -diff --git a/xcaplib/xcapclient.py b/xcaplib/xcapclient.py -index cd409df..384c237 100755 ---- a/xcaplib/xcapclient.py -+++ b/xcaplib/xcapclient.py -@@ -129,6 +129,8 @@ def setup_parser_request(parser): - parser.add_option('--etag', help="perform a conditional operation", metavar='ETAG') - parser.add_option('--add-header', dest='headers', - action='append', default=[], help=optparse.SUPPRESS_HELP) -+ parser.add_option("--eventlib", dest='eventlib_enable', -+ help="Enables non-blocking mode using eventlib library") - parser.add_option("-i", dest='input_filename', - help="source file for the PUT request; default is ") - parser.add_option("-o", dest='output_filename', -@@ -366,7 +368,11 @@ def update_options_from_config(options): - setattr(options, key, value) - - def parse_args(): -- argv = sys.argv[1:] -+ argv = None -+ if "--eventlib" in sys.argv[1:]: -+ argv = sys.argv[2:] -+ else: -+ argv = sys.argv[1:] - - if not argv: - sys.exit('Type %s -h for help.' % sys.argv[0]) -@@ -496,7 +502,7 @@ def get_exit_code(http_error): - return 3 - - def main(): -- if sys.argv[0].endswith('-eventlib'): -+ if "--eventlib" in sys.argv[1:]: - from xcaplib.green import XCAPClient as client_class - else: - client_class = XCAPClient diff --git a/packages/dev-python/python-xcaplib/python-xcaplib-2.0.1.exheres-0 b/packages/dev-python/python-xcaplib/python-xcaplib-2.0.1.exheres-0 index 6565143..b46f43f 100644 --- a/packages/dev-python/python-xcaplib/python-xcaplib-2.0.1.exheres-0 +++ b/packages/dev-python/python-xcaplib/python-xcaplib-2.0.1.exheres-0 @@ -19,7 +19,3 @@ DEPENDENCIES=" dev-python/python-application[>=3.0.3][python_abis:*(-)?] " -DEFAULT_SRC_PREPARE_PATCHES=( - "${FILES}"/${PN}-work-with-eventlib.patch -) -