Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/uhashring/
Date: Sun, 26 Sep 2021 18:37:17
Message-Id: 1632681429.2534302df9c30d0422b81d4b2e4d9361419e7340.Alessandro-Barbieri@gentoo
1 commit: 2534302df9c30d0422b81d4b2e4d9361419e7340
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sun Sep 26 17:58:46 2021 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Sun Sep 26 18:37:09 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2534302d
7
8 dev-python/uhashring: initial import
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 dev-python/uhashring/Manifest | 1 +
13 dev-python/uhashring/metadata.xml | 30 ++++++++++++++++++++++++++++++
14 dev-python/uhashring/uhashring-2.1.ebuild | 26 ++++++++++++++++++++++++++
15 3 files changed, 57 insertions(+)
16
17 diff --git a/dev-python/uhashring/Manifest b/dev-python/uhashring/Manifest
18 new file mode 100644
19 index 000000000..a910ed1d2
20 --- /dev/null
21 +++ b/dev-python/uhashring/Manifest
22 @@ -0,0 +1 @@
23 +DIST uhashring-2.1.tar.gz 18288 BLAKE2B 95d76b1999d21b52ff33b5f76b2eee125d22fa02c51281d6b72058b9d608ea69cca11608f41f50b9348d46a26cc8931c40a6873f0fe17b72d76891b51dcaa1cb SHA512 0e3b3647f1b8b648389fa1018f5903d880947556244633e0b2b4809ccab3d14cf8e742cd14a99e2e88972a84c8fb97956dc290b023e514de63c7793a21b6c294
24
25 diff --git a/dev-python/uhashring/metadata.xml b/dev-python/uhashring/metadata.xml
26 new file mode 100644
27 index 000000000..6459b118c
28 --- /dev/null
29 +++ b/dev-python/uhashring/metadata.xml
30 @@ -0,0 +1,30 @@
31 +<?xml version="1.0" encoding="UTF-8"?>
32 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
33 +<pkgmetadata>
34 + <maintainer type="person">
35 + <description>comaintainers welcome</description>
36 + <email>lssndrbarbieri@×××××.com</email>
37 + <name>Alessandro Barbieri</name>
38 + </maintainer>
39 + <longdescription lang="en">
40 +uhashring implements consistent hashing in pure Python.
41 +
42 +Consistent hashing is mostly used on distributed systems/caches/databases as this avoid the total reshuffling of your key-node mappings when adding or removing a node in your ring (called continuum on libketama). More information and details about this can be found in the literature section.
43 +
44 +This full featured implementation offers:
45 +
46 +a lot of convenient methods to use your consistent hash ring in real world applications.
47 +simple integration with other libs such as memcache through monkey patching.
48 +a full ketama compatibility if you need to use it (see important mention below).
49 +all the missing functions in the libketama C python binding (which is not even available on pypi) for ketama users.
50 +possibility to use your own weight and hash functions if you don't care about the ketama compatibility.
51 +instance-oriented usage so you can use your consistent hash ring object directly in your code (see advanced usage).
52 +native pypy support, since this is a pure python library.
53 +tests of implementation, key distribution and ketama compatibility.
54 +Per node weight is also supported and will affect the nodes distribution on the ring.
55 + </longdescription>
56 + <upstream>
57 + <remote-id type="github">ultrabug/uhashring</remote-id>
58 + <remote-id type="pypi">uhashring</remote-id>
59 + </upstream>
60 +</pkgmetadata>
61
62 diff --git a/dev-python/uhashring/uhashring-2.1.ebuild b/dev-python/uhashring/uhashring-2.1.ebuild
63 new file mode 100644
64 index 000000000..2a04a7725
65 --- /dev/null
66 +++ b/dev-python/uhashring/uhashring-2.1.ebuild
67 @@ -0,0 +1,26 @@
68 +# Copyright 1999-2021 Gentoo Authors
69 +# Distributed under the terms of the GNU General Public License v2
70 +
71 +EAPI=8
72 +
73 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
74 +
75 +inherit distutils-r1
76 +
77 +DESCRIPTION="Full featured consistent hashing python library compatible with ketama"
78 +HOMEPAGE="https://github.com/ultrabug/uhashring"
79 +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
80 +
81 +LICENSE="BSD"
82 +SLOT="0"
83 +KEYWORDS="~amd64"
84 +
85 +RDEPEND=""
86 +DEPEND="
87 + ${RDEPEND}
88 + test? (
89 + >=dev-python/python-memcached-1.59[${PYTHON_USEDEP}]
90 + )
91 +"
92 +
93 +distutils_enable_tests pytest