From nobody Fri Mar 25 13:50:35 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EE7721A344C8; Fri, 25 Mar 2022 13:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KQ3Q34RyKz3h3w; Fri, 25 Mar 2022 13:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBGOcGWkA/voepdfSJd9thmWNpugPy6DAtcOep0/osU=; b=kvKytacYIW3Nq0wyEpAnrl27Rbrw4DNISIf2JxBuQwxnmZgwJI447FITMQ54RHZJ2YZ3MG hpj21cNKbh9uYza/5VPtbkyLFYBsuo3MEzSgN+anT1kvhUfhbdCVyDB3Z+P7yRIC2nDhEM xWNSi8er8qlGGkD7vlKU+h4LgYVi+/B7PBql/na2fWBRt6ClY2etl6IMYCaE9qslk8jfN9 cYn76ylrMkj3hbDDo396d2jP2lC9jC3izRQ3vS8vAvTxNcmbcyrRf0dZfWfxaY/+fYy+mq cs7o6Dg3y6LN0s8G3J+SA0E2y4Tlau1cy0Uy+4zgpfYc7mkJ5R89EUZgBmOOqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40AA75639; Fri, 25 Mar 2022 13:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22PDoZSu037135; Fri, 25 Mar 2022 13:50:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDoZ3T037134; Fri, 25 Mar 2022 13:50:35 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:50:35 GMT Message-Id: <202203251350.22PDoZ3T037134@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: f88c6231d2c5 - main - math/py-pybloom: Fix build with setuptools 58.0.0+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f88c6231d2c52a75d007577ed6a96261b170697d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBGOcGWkA/voepdfSJd9thmWNpugPy6DAtcOep0/osU=; b=isMWK3s2/HqfpSMsRwh/nU7f9TNQgHoXlh+kSTNspQvOkWv88wynu9mZM9ub9eGcyu0FWd +vUk8fBXuwPqNRJ6ZLRLQIkJ17/VSwvRArco6daIb0/L2qglU8ZceLw81ULGvB+WGS1Ctx Z2OJ71XwXhaYUc+I7GqVroJUcm6Po9+tWQys9Thw3f9IWJhKJoJ1979yhnCx1udIYmZe6T 7YKUL2sBvZSPURhYSPQbtSk+zliVcsUPn8F8NW/qDFpGz/DPFnib+nF1rbWqeayCFF3ZCo gllUtQlfifP5WmAwjJDlxbmtGwa9vf81AY8O8I+FaGvDACesllSIyu5GOEYd4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648216236; a=rsa-sha256; cv=none; b=fRf7tArbpYDtK8+qPJco3upvvc/GyeylUvIOqPbd38G+Inh1QOZ0c9VhnyJEGZcmhDzrur ZO04LLx/sWG4ne97pSndw9tRr+I0GPPi678DjDWJ2HkIKt0YtGgMZCkCE/oXkPU84wV9pQ dM8H87YqYNhKM3tZAcaVFotcxTGovHaBCe5q2wNtr5nEnd4LZFBElJ83qJHEvedp3hE2I+ b/8XRnGBXAkJ6njNdIMCBWHL/CFF0lpo0MipW9KORlOy4BsjTeQNQYoaPnsBqYOF5bay30 qYnbFlhps0DNrsttrU5uNMoAN2mlibrS9U3xpzswwpAMjey5xxoTCbw+6ACSRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=f88c6231d2c52a75d007577ed6a96261b170697d commit f88c6231d2c52a75d007577ed6a96261b170697d Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 13:32:48 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:38:16 +0000 math/py-pybloom: Fix build with setuptools 58.0.0+ With hat: python --- math/py-pybloom/files/patch-2to3 | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/math/py-pybloom/files/patch-2to3 b/math/py-pybloom/files/patch-2to3 new file mode 100644 index 000000000000..ccba959e2111 --- /dev/null +++ b/math/py-pybloom/files/patch-2to3 @@ -0,0 +1,60 @@ +--- pybloom_live/benchmarks.py.orig 2018-07-22 09:08:15 UTC ++++ pybloom_live/benchmarks.py +@@ -2,9 +2,9 @@ + # + """Test performance of BloomFilter at a set capacity and error rate.""" + import sys +-from pybloom import BloomFilter ++from .pybloom import BloomFilter + import bitarray, math, time +-from utils import range_fn ++from .utils import range_fn + + + def main(capacity=100000, request_error_rate=0.1): +@@ -14,18 +14,18 @@ def main(capacity=100000, request_error_rate=0.1): + for i in range_fn(0, f.capacity): + f.add(i, skip_check=True) + end = time.time() +- print("{:5.3f} seconds to add to capacity, {:10.2f} entries/second".format( +- end - start, f.capacity / (end - start))) ++ print(("{:5.3f} seconds to add to capacity, {:10.2f} entries/second".format( ++ end - start, f.capacity / (end - start)))) + oneBits = f.bitarray.count(True) + zeroBits = f.bitarray.count(False) +- print "Number of 1 bits:", oneBits +- print "Number of 0 bits:", zeroBits +- print("Number of Filter Bits:", f.num_bits) +- print("Number of slices:", f.num_slices) +- print("Bits per slice:", f.bits_per_slice) ++ print("Number of 1 bits:", oneBits) ++ print("Number of 0 bits:", zeroBits) ++ print(("Number of Filter Bits:", f.num_bits)) ++ print(("Number of slices:", f.num_slices)) ++ print(("Bits per slice:", f.bits_per_slice)) + print("------") +- print("Fraction of 1 bits at capacity: {:5.3f}".format( +- oneBits / float(f.num_bits))) ++ print(("Fraction of 1 bits at capacity: {:5.3f}".format( ++ oneBits / float(f.num_bits)))) + # Look for false positives and measure the actual fp rate + trials = f.capacity + fp = 0 +@@ -36,14 +36,14 @@ def main(capacity=100000, request_error_rate=0.1): + end = time.time() + print(("{:5.3f} seconds to check false positives, " + "{:10.2f} checks/second".format(end - start, trials / (end - start)))) +- print("Requested FP rate: {:2.4f}".format(request_error_rate)) +- print("Experimental false positive rate: {:2.4f}".format(fp / float(trials))) ++ print(("Requested FP rate: {:2.4f}".format(request_error_rate))) ++ print(("Experimental false positive rate: {:2.4f}".format(fp / float(trials)))) + # Compute theoretical fp max (Goel/Gupta) + k = f.num_slices + m = f.num_bits + n = f.capacity + fp_theory = math.pow((1 - math.exp(-k * (n + 0.5) / (m - 1))), k) +- print("Projected FP rate (Goel/Gupta): {:2.6f}".format(fp_theory)) ++ print(("Projected FP rate (Goel/Gupta): {:2.6f}".format(fp_theory))) + + if __name__ == '__main__': + main()