From nobody Mon Jan 30 13:08:34 2023 X-Original-To: dev-commits-ports-all@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 4P57m260nqz3cZYC; Mon, 30 Jan 2023 13:08:34 +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 4P57m25BHcz3NGk; Mon, 30 Jan 2023 13:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675084114; 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=lL+OVqL+8+S22zWh8pclt/ub2cNqDJYipS53G94b5Ms=; b=SrQ0Wk0YK/uP29gQvkFRG5Xna+BNam1eY8Rk0NSaszqEqNOsljwP8eh24wgAqN8lHQdlQ6 SVJKhDAcnnjCrPfi2zuleuaZWdR5I+aU1ALVuwlP42UldW58uPpXDCINoopc35vcI2yURt Z25FxRM0TaCwPe1pDsRgSkYaQ1nFpadUVBqFXJn6C73lCTtK7mugfRC9zf5mIkwmuqKNyq dEKCxkNZ+2diqZhzcYk6ZAKEWvENrcY0BbwN04UA59esO+RJ6X08CCM9YpdWZxK35Y7d1p sVRC80q2abdELgyUStcM0L9i75QjuwQZUh5rcBivcZjFaHhRR41KU2Xq8DfOmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675084114; 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=lL+OVqL+8+S22zWh8pclt/ub2cNqDJYipS53G94b5Ms=; b=aoovFqpRsbPhyRHJECwgXvosBvMuKG/xzXjgokO1s6dNDTvfCsvbl/zVjcRihrQkBKnsfU RUqHHgcY+9GqEBygaqoA4XRfeYi5JtrW7xPQjdhZLJo+uHY1pqvEJVGTz88nYGler74n0W 0D/G6AauwXa+VNVecvP6VIznnO0hHOFP7YwAzpsqZutJ58VPN38lPRF0JGKETsJWimbOrT 5JchrAfrBh/V8tBgOd3TbhIwNuP5+obCMpIBtB73s+E2c1MC+yjw3HSmo9msDL0FTar5XW JnOUp6UMTPJ6sRPLOs+5UEA3KhjAJiMBf9c9Zg/bTXBJmf2qL6/IqFcR1BIerg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675084114; a=rsa-sha256; cv=none; b=cH5qfmK+FYZl6Fo/lOMj7G6eAMHmZYqTUEhjI8t2pNYERf6sgIutYEhiSYxIlK2XiqPmQN mM5DFubgp9lPXS1G5QXbXL+oT7EUz+JzZquWv8kn7NXy0PjZkk3srOYhjMWy45S0KwALjg /WkiqinU489/guYAnGUcTLnZyx4BZ37mMPq0JIj/R1LWaCPDqFuRcoLUxUe5wu3KAvfmfH jLmfjU/1J+lvO0zsUA0ptjVbaoL22v7mqO/Lz7WJGW6x2zaVrYcv7nlK2tgbcfZjsA9qGT 8bGOs/X0VH8asloFxfjzXGFx3Cey1m6SvDqGN1gbSjjA83u6fJtoAloAiHNHVA== 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 4P57m24Cx0z189D; Mon, 30 Jan 2023 13:08:34 +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 30UD8Yev056599; Mon, 30 Jan 2023 13:08:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30UD8YRg056598; Mon, 30 Jan 2023 13:08:34 GMT (envelope-from git) Date: Mon, 30 Jan 2023 13:08:34 GMT Message-Id: <202301301308.30UD8YRg056598@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: 232f529c360a - main - devel/py-editdistance: Update to 0.6.2 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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: 232f529c360aba352646cab542aee883610b6509 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=232f529c360aba352646cab542aee883610b6509 commit 232f529c360aba352646cab542aee883610b6509 Author: Po-Chuan Hsieh AuthorDate: 2023-01-30 12:31:08 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-01-30 12:59:42 +0000 devel/py-editdistance: Update to 0.6.2 Changes: https://github.com/roy-ht/editdistance/releases --- devel/py-editdistance/Makefile | 8 ++++++-- devel/py-editdistance/distinfo | 6 +++--- devel/py-editdistance/files/bycython.pyx | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/devel/py-editdistance/Makefile b/devel/py-editdistance/Makefile index 794bb8968b76..5d0596463c5e 100644 --- a/devel/py-editdistance/Makefile +++ b/devel/py-editdistance/Makefile @@ -1,5 +1,5 @@ PORTNAME= editdistance -PORTVERSION= 0.6.1 +PORTVERSION= 0.6.2 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,7 +12,11 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE USES= python:3.6+ -USE_PYTHON= autoplist concurrent distutils +USE_PYTHON= autoplist concurrent cython distutils + +post-patch: +# https://github.com/roy-ht/editdistance/blob/master/editdistance/bycython.pyx + @${CP} ${FILESDIR}/bycython.pyx ${WRKSRC}/editdistance/bycython.pyx post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + diff --git a/devel/py-editdistance/distinfo b/devel/py-editdistance/distinfo index 8558631fd34d..f9dbbfed507d 100644 --- a/devel/py-editdistance/distinfo +++ b/devel/py-editdistance/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1669057721 -SHA256 (editdistance-0.6.1.tar.gz) = 124a3ebe1934ed86c0bdb5deafcc67494604a7cc63bdbb587665b76c85648262 -SIZE (editdistance-0.6.1.tar.gz) = 29267 +TIMESTAMP = 1674589766 +SHA256 (editdistance-0.6.2.tar.gz) = 97a722f5e859ed4c26da269e71a11995f23ac9c880618b8a2028373eb74283be +SIZE (editdistance-0.6.2.tar.gz) = 31508 diff --git a/devel/py-editdistance/files/bycython.pyx b/devel/py-editdistance/files/bycython.pyx new file mode 100644 index 000000000000..d64a67a8e893 --- /dev/null +++ b/devel/py-editdistance/files/bycython.pyx @@ -0,0 +1,22 @@ +# distutils: language = c++ +# distutils: sources = editdistance/_editdistance.cpp + +from libc.stdlib cimport malloc, free +# from libc.stdint cimport int64_t + +cdef extern from "./_editdistance.h": + ctypedef int int64_t + unsigned int edit_distance(const int64_t *a, const unsigned int asize, const int64_t *b, const unsigned int bsize) + +cpdef unsigned int eval(object a, object b) except 0xffffffffffffffff: + cdef unsigned int i, dist + cdef int64_t *al = malloc(len(a) * sizeof(int64_t)) + for i in range(len(a)): + al[i] = hash(a[i]) + cdef int64_t *bl = malloc(len(b) * sizeof(int64_t)) + for i in range(len(b)): + bl[i] = hash(b[i]) + dist = edit_distance(al, len(a), bl, len(b)) + free(al) + free(bl) + return dist