From nobody Tue Apr 18 18:08:10 2023 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 4Q1Bjk60Jwz45Rnf; Tue, 18 Apr 2023 18:08:10 +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 4Q1Bjk4zttz4D6x; Tue, 18 Apr 2023 18:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681841290; 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=+j1aGFXXtSNTvL70DgPmWlIIcJoR6SzLLLIVt5czCWE=; b=uzv9F3rfrpZzqQN3S1zNJJRxB3CXPOMnfRUdTbkZYZfcs5xx4EzhsGeZqc5JjGZZ4QyhAH tDeHoMkBRt+9rtVHwps73TXNfDjYqE/XHxKPZPR1N5PmhVMuWYcIcVvz7cqIyyzROvpCNU L75shNFqPNOXpwU0UhjpUykuT+yQngld8X8n5V0Pt/k2wc/wQXQpwuUvRI0sChaCg8nqjp SKGqq2QzDMsRth03kxlBM03mHe+B+3UfrKl6iWj7fXh69IFOyvSeBcQuVA4DyShWR865bP wxSh21palSSYLBANM8QJqUAx2EWMpzQNyx8q3km6IiYCo9jxOrvWm7Vd+Yz37A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681841290; 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=+j1aGFXXtSNTvL70DgPmWlIIcJoR6SzLLLIVt5czCWE=; b=xcel9CHZPMKw4/PVJCEpd1XE3Bwj6Iv+65sW+ozr5r6J3BO6WtFGCVAAkvnyDoa7PgaJrN tNjGQXJvxCSzh9zwH0GjreaSCsoxzmoLkUst+PxZtfZfNHBPt7C1aEk4jg88r1Gw+82Awa chahpKK4ltIq6wxD6TTHhbjgOmxLxEPxPGwak4R7eVgEo0WDHhbrVn7nAq4oVGnnCW6ZoW oWOIQ5f+s5kKOePv63PYcMt7CptrMObdpI2dxRR6Zo2ZPLegiq0OYyGXAZWan7qP0ZUCWE dC6wx3IxkjIWHYOS0TuGOOk+fp3ay8wfjfDbUJL90QVcpmygbtfT9UOAkqOB3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681841290; a=rsa-sha256; cv=none; b=uPqkYuqMFhN+Utdu4U9hdSEPKMaRx0jPGyp+LLvAIPU/w7pWi/nRPaNqITlxs3Cf2I3ETQ WnCTRLvYeSgLc0NezoFlRmSZH05XXEGb6EM9maz5vuTuJ96qu9zUdx9ACwHB67Ms7OgZAr qu+z4rgL/7pj1gBw4p6BaA0w4ABJbpIbG5EvscAfznxIo33naA2lNFJGP4ZcxEc4mVt8Oc A7yhacJ8lFYYXUxpw/uRAhd4cxoUtFj69nD49NX97qoZCqv2+VaWGU4FTPRKGXrQdAJlG6 zS+SoOoUUQ8ylUKeOZLEk1M0OWI987p9/ZnxudA6UFnqvrhnllbZhAaMEj8v0A== 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 4Q1Bjk3xNfzMLX; Tue, 18 Apr 2023 18:08:10 +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 33II8ACM078390; Tue, 18 Apr 2023 18:08:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33II8Age078389; Tue, 18 Apr 2023 18:08:10 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:08:10 GMT Message-Id: <202304181808.33II8Age078389@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: 36ae8f643ea4 - main - devel/py-klepto: Add py-klepto 0.2.3 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: 36ae8f643ea4d811693c6cf3af8cc0fee8e8df65 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=36ae8f643ea4d811693c6cf3af8cc0fee8e8df65 commit 36ae8f643ea4d811693c6cf3af8cc0fee8e8df65 Author: Po-Chuan Hsieh AuthorDate: 2023-04-18 17:51:34 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-04-18 18:00:40 +0000 devel/py-klepto: Add py-klepto 0.2.3 klepto extends Python's lru_cache to utilize different keymaps and alternate caching algorithms, such as lfu_cache and mru_cache. While caching is meant for fast access to saved results, klepto also has archiving capabilities, for longer-term storage. klepto uses a simple dictionary-sytle interface for all caches and archives, and all caches can be applied to any Python function as a decorator. Keymaps are algorithms for converting a function's input signature to a unique dictionary, where the function's results are the dictionary value. Thus for y = f(x), y will be stored in cache[x] (e.g. {x:y}). klepto provides both standard and "safe" caching, where "safe" caches are slower but can recover from hashing errors. klepto is intended to be used for distributed and parallel computing, where several of the keymaps serialize the stored objects. Caches and archives are intended to be read/write accessible from different threads and processes. klepto enables a user to decorate a function, save the results to a file or database archive, close the interpreter, start a new session, and reload the function and it's cache. --- devel/Makefile | 1 + devel/py-klepto/Makefile | 24 ++++++++++++++++++++++++ devel/py-klepto/distinfo | 3 +++ devel/py-klepto/pkg-descr | 16 ++++++++++++++++ 4 files changed, 44 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index a649b0effb2a..921fb473867e 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4834,6 +4834,7 @@ SUBDIR += py-keystoneauth1 SUBDIR += py-keystonemiddleware SUBDIR += py-kitchen + SUBDIR += py-klepto SUBDIR += py-knack SUBDIR += py-l18n SUBDIR += py-lark diff --git a/devel/py-klepto/Makefile b/devel/py-klepto/Makefile new file mode 100644 index 000000000000..66d6769d1b0e --- /dev/null +++ b/devel/py-klepto/Makefile @@ -0,0 +1,24 @@ +PORTNAME= klepto +PORTVERSION= 0.2.3 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Persistent caching to memory, disk, or database +WWW= https://github.com/uqfoundation/klepto + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=42:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dill>=0.3.6:devel/py-dill@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pox>=0.3.2:devel/py-pox@${PY_FLAVOR} + +USES= python:3.7+ +USE_PYTHON= autoplist concurrent pep517 + +NO_ARCH= yes + +.include diff --git a/devel/py-klepto/distinfo b/devel/py-klepto/distinfo new file mode 100644 index 000000000000..987b57c67e30 --- /dev/null +++ b/devel/py-klepto/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1681836949 +SHA256 (klepto-0.2.3.tar.gz) = fc66eca93413d8c348a31de3e7383d37d1f01b9e98755cac8358e9e0a88830c3 +SIZE (klepto-0.2.3.tar.gz) = 155892 diff --git a/devel/py-klepto/pkg-descr b/devel/py-klepto/pkg-descr new file mode 100644 index 000000000000..406323fc9cd2 --- /dev/null +++ b/devel/py-klepto/pkg-descr @@ -0,0 +1,16 @@ +klepto extends Python's lru_cache to utilize different keymaps and alternate +caching algorithms, such as lfu_cache and mru_cache. While caching is meant for +fast access to saved results, klepto also has archiving capabilities, for +longer-term storage. klepto uses a simple dictionary-sytle interface for all +caches and archives, and all caches can be applied to any Python function as a +decorator. Keymaps are algorithms for converting a function's input signature to +a unique dictionary, where the function's results are the dictionary value. Thus +for y = f(x), y will be stored in cache[x] (e.g. {x:y}). + +klepto provides both standard and "safe" caching, where "safe" caches are slower +but can recover from hashing errors. klepto is intended to be used for +distributed and parallel computing, where several of the keymaps serialize the +stored objects. Caches and archives are intended to be read/write accessible +from different threads and processes. klepto enables a user to decorate a +function, save the results to a file or database archive, close the interpreter, +start a new session, and reload the function and it's cache.