dev-python/smmap2: A sliding window memory map manager
authorMarius Brehler <marbre@linux.sungazer.de>
Thu, 25 May 2017 09:05:04 +0000 (11:05 +0200)
committerMichał Górny <mgorny@gentoo.org>
Thu, 25 May 2017 10:09:12 +0000 (12:09 +0200)
Smmap wraps an interface around mmap and tracks the mapped files as
well as the amount of clients who use it. If the system runs out of
resources, or if a memory limit is reached, it will automatically
unload unused maps to allow continued operation.

Required to bump dev-python/gitdb (now renamed to gitdb2).

Bug: https://bugs.gentoo.org/619508
Closes: https://github.com/gentoo/gentoo/pull/4740
Package-Manager: Portage-2.3.5, Repoman-2.3.1

dev-python/smmap2/Manifest [new file with mode: 0644]
dev-python/smmap2/metadata.xml [new file with mode: 0644]
dev-python/smmap2/smmap2-2.0.1.ebuild [new file with mode: 0644]

diff --git a/dev-python/smmap2/Manifest b/dev-python/smmap2/Manifest
new file mode 100644 (file)
index 0000000..27e0f96
--- /dev/null
@@ -0,0 +1 @@
+DIST smmap2-2.0.1.tar.gz 21948 SHA256 5c9fd3ac4a30b85d041a8bd3779e16aa704a161991e74b9a46692bc368e68752 SHA512 7c8d27c06befdabf65049e5e0bac5beb07c19ff398a343d953120b9cb1c9ed203232012f4b12180af20fa0dde8feb0d6e8af3e389932407688bcc345548f2501 WHIRLPOOL 973d82e6cd679a82189c617469cb4d749f12d56f8aa0d0cdac9177fb09ae71c3986200730a1b320479a4ee87e9796602f17aadf5b2e12f29d0e950ec9ebcbbbf
diff --git a/dev-python/smmap2/metadata.xml b/dev-python/smmap2/metadata.xml
new file mode 100644 (file)
index 0000000..8c3e721
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="project">
+    <email>python@gentoo.org</email>
+    <name>Python</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="pypi">smmap2</remote-id>
+    <remote-id type="github">gitpython-developers/smmap</remote-id>
+  </upstream>
+</pkgmetadata>
diff --git a/dev-python/smmap2/smmap2-2.0.1.ebuild b/dev-python/smmap2/smmap2-2.0.1.ebuild
new file mode 100644 (file)
index 0000000..522ebe5
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1
+
+DESCRIPTION="A pure python implementation of a sliding window memory map manager"
+HOMEPAGE="
+       https://pypi.python.org/pypi/smmap2
+       https://github.com/gitpython-developers/smmap"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="test"
+
+DEPEND="
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       test? (
+               dev-python/nose[${PYTHON_USEDEP}]
+       )"
+RDEPEND=""
+
+python_test() {
+       nosetests -v || die "tests failed under ${EPYTHON}"
+}