diff --git a/mail/pyzor/Makefile b/mail/pyzor/Makefile index 4beb5440aee3..699e92de3ad7 100644 --- a/mail/pyzor/Makefile +++ b/mail/pyzor/Makefile @@ -1,25 +1,24 @@ PORTNAME= pyzor -PORTVERSION= 1.0.0 -PORTREVISION= 3 +PORTVERSION= 1.1.2 CATEGORIES= mail python -MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -PATCH_SITES= https://github.com/SpamExperts/pyzor/commit/ -PATCHFILES= 67b471dd168db9468548aef3ffadca9554164ac0.diff:-p1 \ - 6332a429ed415187599ecce7d8a169ee19f0bbe5.diff:-p1 - MAINTAINER= dbaio@FreeBSD.org COMMENT= Collaborative, networked system to detect and block spam WWW= https://github.com/SpamExperts/pyzor LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gdbm>=0:databases/py-gdbm@${PY_FLAVOR} USES= python -USE_PYTHON= distutils autoplist +USE_GITHUB= yes +GH_ACCOUNT= SpamExperts +GH_TAGNAME= release-1-1-2 +USE_PYTHON= pep517 autoplist NO_ARCH= yes .include diff --git a/mail/pyzor/distinfo b/mail/pyzor/distinfo index 2b020b124006..1bf7961761fc 100644 --- a/mail/pyzor/distinfo +++ b/mail/pyzor/distinfo @@ -1,7 +1,3 @@ -TIMESTAMP = 1642351477 -SHA256 (pyzor-1.0.0.tar.gz) = 10ea114bdee2eee5edd6afe8eeddaaf605620445977ae019a3e9b1cbb6bc3b27 -SIZE (pyzor-1.0.0.tar.gz) = 39945 -SHA256 (67b471dd168db9468548aef3ffadca9554164ac0.diff) = 7551cc98b7db1622f9e84408bd658482a21fbedd71300bdfa118d1175022bc47 -SIZE (67b471dd168db9468548aef3ffadca9554164ac0.diff) = 1153 -SHA256 (6332a429ed415187599ecce7d8a169ee19f0bbe5.diff) = eb464d497df5c7ac82cd277f70d8549df0b207d3974b383579c85e84eaab5839 -SIZE (6332a429ed415187599ecce7d8a169ee19f0bbe5.diff) = 559 +TIMESTAMP = 1770217761 +SHA256 (SpamExperts-pyzor-1.1.2-release-1-1-2_GH0.tar.gz) = d1939f9ca836b13b07a1250f53b4f91a29a678de8955e9fc4f4a3c139d5906c3 +SIZE (SpamExperts-pyzor-1.1.2-release-1-1-2_GH0.tar.gz) = 138970 diff --git a/mail/pyzor/files/patch-7afe0ae.patch b/mail/pyzor/files/patch-7afe0ae.patch deleted file mode 100644 index 21cfd2b76adc..000000000000 --- a/mail/pyzor/files/patch-7afe0ae.patch +++ /dev/null @@ -1,182 +0,0 @@ -partial: - -From 7afe0aedc320dd2689bfbf45e97fdb09adb89686 Mon Sep 17 00:00:00 2001 -From: Alexandru Chirila -Date: Fri, 15 Jan 2016 12:30:39 +0200 -Subject: [PATCH] Refs. #46. Fix all unitest for Python3. - -Adjust all the unittest and code to pass on Python3 -without any 2to3 conversion (even without the -python-future library installed). ---- - pyzor/client.py | 6 ++-- - pyzor/digest.py | 2 +- - pyzor/engines/common.py | 4 +-- - pyzor/engines/gdbm_.py | 2 +- - pyzor/engines/mysql.py | 2 +- - pyzor/server.py | 4 +-- - scripts/pyzor | 4 +-- - scripts/pyzord | 2 +- - -| ------------------------------------------ | -| removed from original patch: -| -| scripts/run_tests | 5 ++-- -| tests/benchmark/measure_server_response.py | 8 ++--- -| tests/functional/test_pyzor.py | 22 +++++++------- -| tests/unit/test_account.py | 35 +++++++++++----------- -| tests/unit/test_config.py | 7 +++-- -| tests/unit/test_engines/test_gdbm.py | 2 +- -| tests/unit/test_forwarder.py | 2 +- -| tests/unit/test_server.py | 9 ++++-- -| tests/util/__init__.py | 8 ++--- -| web/application.py | 4 +-- -| ------------------------------------------ | - 18 files changed, 67 insertions(+), 61 deletions(-) - -diff --git a/pyzor/client.py b/pyzor/client.py -index 82d6361..07daba2 100644 ---- pyzor/client.py -+++ pyzor/client.py -@@ -78,7 +78,7 @@ def __init__(self, accounts=None, timeout=None, spec=None): - if accounts is None: - accounts = {} - self.accounts = dict(((host, int(port)), account) -- for (host, port), account in accounts.iteritems()) -+ for (host, port), account in accounts.items()) - if spec is None: - spec = pyzor.digest.digest_spec - self.spec = spec -@@ -227,12 +227,12 @@ def flush(self): - - def force(self): - """Force send any remaining reports.""" -- for address, msg in self.r_requests.iteritems(): -+ for address, msg in self.r_requests.items(): - try: - self.send(msg, address) - except: - continue -- for address, msg in self.w_requests.iteritems(): -+ for address, msg in self.w_requests.items(): - try: - self.send(msg, address) - except: -diff --git a/pyzor/digest.py b/pyzor/digest.py -index 100a4c6..058c208 100644 ---- pyzor/digest.py -+++ pyzor/digest.py -@@ -105,7 +105,7 @@ def handle_atomic(self, lines): - def handle_pieced(self, lines, spec): - """Digest stuff according to the spec.""" - for offset, length in spec: -- for i in xrange(length): -+ for i in range(length): - try: - line = lines[int(offset * len(lines) // 100) + i] - except IndexError: -diff --git a/pyzor/engines/common.py b/pyzor/engines/common.py -index a96c656..17f083c 100644 ---- pyzor/engines/common.py -+++ pyzor/engines/common.py -@@ -31,7 +31,7 @@ def __init__(self, r_count=0, wl_count=0, r_entered=None, - - def wl_increment(self): - # overflow prevention -- if self.wl_count < sys.maxint: -+ if self.wl_count < sys.maxsize: - self.wl_count += 1 - if self.wl_entered is None: - self.wl_entered = datetime.datetime.now() -@@ -39,7 +39,7 @@ def wl_increment(self): - - def r_increment(self): - # overflow prevention -- if self.r_count < sys.maxint: -+ if self.r_count < sys.maxsize: - self.r_count += 1 - if self.r_entered is None: - self.r_entered = datetime.datetime.now() -diff --git a/pyzor/engines/gdbm_.py b/pyzor/engines/gdbm_.py -index d9415ba..e75fbd3 100644 ---- pyzor/engines/gdbm_.py -+++ pyzor/engines/gdbm_.py -@@ -75,7 +75,7 @@ def items(self): - def apply_method(self, method, varargs=(), kwargs=None): - if kwargs is None: - kwargs = {} -- return apply(method, varargs, kwargs) -+ return method(*varargs, **kwargs) - - def __getitem__(self, key): - return self.apply_method(self._really_getitem, (key,)) -diff --git a/pyzor/engines/mysql.py b/pyzor/engines/mysql.py -index baef14d..f8d893d 100644 ---- pyzor/engines/mysql.py -+++ pyzor/engines/mysql.py -@@ -294,7 +294,7 @@ def _safe_call(self, name, method, args): - def reconnect(self): - if not self.bound: - return -- for _ in xrange(self.bound): -+ for _ in range(self.bound): - self.db_queue.put(self._get_new_connection()) - - def _reconnect(self, db): -diff --git a/pyzor/server.py b/pyzor/server.py -index abae192..b342222 100644 ---- pyzor/server.py -+++ pyzor/server.py -@@ -137,7 +137,7 @@ def __init__(self, address, database, passwd_fn, access_fn, prefork=4): - def serve_forever(self, poll_interval=0.5): - """Fork the current process and wait for all children to finish.""" - pids = [] -- for dummy in xrange(self._prefork): -+ for dummy in range(self._prefork): - database = self.database.next() - pid = os.fork() - if not pid: -@@ -312,7 +312,7 @@ def handle_pong(self, digests): - This command returns maxint for report counts and 0 whitelist. - """ - self.server.log.debug("Request pong for %s", digests[0]) -- self.response["Count"] = "%d" % sys.maxint -+ self.response["Count"] = "%d" % sys.maxsize - self.response["WL-Count"] = "%d" % 0 - - def handle_check(self, digests): -diff --git a/scripts/pyzor b/scripts/pyzor -index 19b1d21..040b4c5 100755 ---- scripts/pyzor -+++ scripts/pyzor -@@ -110,7 +110,7 @@ def load_configuration(): - config = ConfigParser.ConfigParser() - # Set the defaults. - config.add_section("client") -- for key, value in defaults.iteritems(): -+ for key, value in defaults.items(): - config.set("client", key, value) - # Override with the configuration. - config.read(os.path.join(options.homedir, "config")) -@@ -372,7 +372,7 @@ def genkey(client, servers, config, hash_func=hashlib.sha1): - return False - # pylint: disable-msg=W0612 - salt = "".join([chr(random.randint(0, 255)) -- for unused in xrange(hash_func(b"").digest_size)]) -+ for unused in range(hash_func(b"").digest_size)]) - if sys.version_info >= (3, 0): - salt = salt.encode("utf8") - salt_digest = hash_func(salt) -diff --git a/scripts/pyzord b/scripts/pyzord -index 7b073a7..3ac7a2c 100755 ---- scripts/pyzord -+++ scripts/pyzord -@@ -244,7 +244,7 @@ def load_configuration(): - config = ConfigParser.ConfigParser() - # Set the defaults. - config.add_section("server") -- for key, value in defaults.iteritems(): -+ for key, value in defaults.items(): - config.set("server", key, value) - # Override with the configuration. - config.read(os.path.join(options.homedir, "config"))