From 10218220989ef455095929c5d1fdfdc74dcc5f34 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 23 Feb 2020 04:33:05 +0100 Subject: [PATCH] dev-python/atomiclong: new package Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Alessandro Barbieri --- dev-python/atomiclong/Manifest | 1 + dev-python/atomiclong/atomiclong-0.1.1.ebuild | 30 +++++++++++++++++ dev-python/atomiclong/atomiclong-9999.ebuild | 32 +++++++++++++++++++ dev-python/atomiclong/metadata.xml | 21 ++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 dev-python/atomiclong/Manifest create mode 100644 dev-python/atomiclong/atomiclong-0.1.1.ebuild create mode 100644 dev-python/atomiclong/atomiclong-9999.ebuild create mode 100644 dev-python/atomiclong/metadata.xml diff --git a/dev-python/atomiclong/Manifest b/dev-python/atomiclong/Manifest new file mode 100644 index 0000000000..bfc8fec52c --- /dev/null +++ b/dev-python/atomiclong/Manifest @@ -0,0 +1 @@ +DIST atomiclong-0.1.1.tar.gz 5057 BLAKE2B 2583674eafd2e89c91629db69e6c118d22ae169df4131e3d63a584ed9857df47bb85c0764cd60b7df35eb8db5b4aedfe043bfcfb960909e2abcb97a27ba7567d SHA512 c275cff805df2275b6d9cfabed072c296019f1e7f6e2d718e0cec60ca40a99c6e8043a17a82f752096a1764cbc63e5681739da921ce1c89dfa8e5a6349e1772a diff --git a/dev-python/atomiclong/atomiclong-0.1.1.ebuild b/dev-python/atomiclong/atomiclong-0.1.1.ebuild new file mode 100644 index 0000000000..7b15a08711 --- /dev/null +++ b/dev-python/atomiclong/atomiclong-0.1.1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +PYTHON_COMPAT=( python3_{6,7} ) + +inherit distutils-r1 + +SRC_URI="https://files.pythonhosted.org/packages/86/8c/70aea8215c6ab990f2d91e7ec171787a41b7fbc83df32a067ba5d7f3324f/${P}.tar.gz" + +DESCRIPTION="An AtomicLong type using CFFI." +HOMEPAGE="https://github.com/dreid/atomiclong" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND="virtual/python-cffi[${PYTHON_USEDEP}]" + +DEPEND="${RDEPEND} + test? ( + dev-python/pytest[${PYTHON_USEDEP}] + ) +" + +python_test() { + pytest -vv || die +} diff --git a/dev-python/atomiclong/atomiclong-9999.ebuild b/dev-python/atomiclong/atomiclong-9999.ebuild new file mode 100644 index 0000000000..788043a928 --- /dev/null +++ b/dev-python/atomiclong/atomiclong-9999.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +PYTHON_COMPAT=( python3_{6,7} ) + +inherit distutils-r1 + +SRC_URI="" +EGIT_REPO_URI="https://github.com/dreid/${PN}.git" +inherit git-r3 + +DESCRIPTION="An AtomicLong type using CFFI." +HOMEPAGE="https://github.com/dreid/atomiclong" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND="virtual/python-cffi[${PYTHON_USEDEP}]" + +DEPEND="${RDEPEND} + test? ( + dev-python/pytest[${PYTHON_USEDEP}] + ) +" + +python_test() { + pytest -vv || die +} diff --git a/dev-python/atomiclong/metadata.xml b/dev-python/atomiclong/metadata.xml new file mode 100644 index 0000000000..2607e3e744 --- /dev/null +++ b/dev-python/atomiclong/metadata.xml @@ -0,0 +1,21 @@ + + + + + lssndrbarbieri@gmail.com + Alessandro Barbieri + + + proxy-maint@gentoo.org + Proxy Maintainers + + + dreid/atomiclong + + +Sometimes you need to increment some numbers ... atomically ... in python. +AtomicLong was born out of the need for fast thread-safe counters in python. +It uses CFFI to bind GCC's Atomic Builtins. +Its value is a C long which can be incremented, decremented, and set atomically. It is inspired by Java's java.util.concurrent.atomic.AtomicLong. + +