* [gentoo-commits] repo/gentoo:master commit in: dev-python/lmdb/, dev-python/lmdb/files/
@ 2020-10-09 12:43 Louis Sautier
0 siblings, 0 replies; 2+ messages in thread
From: Louis Sautier @ 2020-10-09 12:43 UTC (permalink / raw
To: gentoo-commits
commit: 4ac7b9cd6b2631631d250b7c618d43f484e3dd63
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 9 12:39:57 2020 +0000
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Fri Oct 9 12:43:10 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ac7b9cd
dev-python/lmdb: add PyPy3 support
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
dev-python/lmdb/files/lmdb-1.0.0-pypy3.patch | 40 ++++++++++++++++++++++++++++
dev-python/lmdb/lmdb-1.0.0.ebuild | 14 +++++++---
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/dev-python/lmdb/files/lmdb-1.0.0-pypy3.patch b/dev-python/lmdb/files/lmdb-1.0.0-pypy3.patch
new file mode 100644
index 00000000000..008213ac46c
--- /dev/null
+++ b/dev-python/lmdb/files/lmdb-1.0.0-pypy3.patch
@@ -0,0 +1,40 @@
+From 2d0f93984f53c19925f07d742584f5e3e69d7902 Mon Sep 17 00:00:00 2001
+From: Nic Watson <github@nicwatson.org>
+Date: Wed, 7 Oct 2020 12:44:30 -0400
+Subject: [PATCH] Get pypy3 passing tests
+
+---
+ .travis.yml | 2 +-
+ tests/cursor_test.py | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tests/cursor_test.py b/tests/cursor_test.py
+index acfb0ea..22dd6f8 100644
+--- a/tests/cursor_test.py
++++ b/tests/cursor_test.py
+@@ -245,7 +245,7 @@ def setUp(self, redo=False):
+ self.txn = self.env.begin(write=True)
+ self.c = self.txn.cursor()
+
+- @unittest.skipIf(sys.platform != 'linux', "test only works on Linux")
++ @unittest.skipIf(not sys.platform.startswith('linux'), "test only works on Linux")
+ def test_preload(self):
+ """
+ Test that reading just the key doesn't prefault the value contents, but
+@@ -264,13 +264,13 @@ def test_preload(self):
+ self.path, self.env = testlib.temp_env(path=self.path, writemap=True)
+ self.txn = self.env.begin(write=True, buffers=True)
+ self.c = self.txn.cursor()
+- minflts_before = resource.getrusage(resource.RUSAGE_THREAD)[6]
++ minflts_before = resource.getrusage(resource.RUSAGE_SELF)[6]
+ self.c.set_key(B('a'))
+ assert self.c.key() == B('a')
+- minflts_after_key = resource.getrusage(resource.RUSAGE_THREAD)[6]
++ minflts_after_key = resource.getrusage(resource.RUSAGE_SELF)[6]
+
+ self.c.value()
+- minflts_after_value = resource.getrusage(resource.RUSAGE_THREAD)[6]
++ minflts_after_value = resource.getrusage(resource.RUSAGE_SELF)[6]
+
+ epsilon = 20
+
diff --git a/dev-python/lmdb/lmdb-1.0.0.ebuild b/dev-python/lmdb/lmdb-1.0.0.ebuild
index c96b90dc4e1..8801f1e8235 100644
--- a/dev-python/lmdb/lmdb-1.0.0.ebuild
+++ b/dev-python/lmdb/lmdb-1.0.0.ebuild
@@ -3,9 +3,7 @@
EAPI=7
-# TODO: add PyPy3 when it is supported
-# https://github.com/jnwatson/py-lmdb/issues/260
-PYTHON_COMPAT=( python3_{6..9} )
+PYTHON_COMPAT=( pypy3 python3_{6..9} )
inherit distutils-r1
@@ -23,6 +21,11 @@ DEPEND="${RDEPEND}"
distutils_enable_sphinx docs
distutils_enable_tests pytest
+PATCHES=(
+ # https://github.com/jnwatson/py-lmdb/commit/2d0f93984f53c19925f07d742584f5e3e69d7902
+ "${FILESDIR}/${P}-pypy3.patch"
+)
+
python_compile() {
LMDB_FORCE_SYSTEM=1 distutils-r1_python_compile
}
@@ -30,3 +33,8 @@ python_compile() {
python_test() {
pytest tests -vv || die "Tests fail with ${EPYTHON}"
}
+
+python_install() {
+ # This is required when the CFFI extension is used (for PyPy3)
+ LMDB_FORCE_SYSTEM=1 distutils-r1_python_install
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lmdb/, dev-python/lmdb/files/
@ 2021-03-07 22:39 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-03-07 22:39 UTC (permalink / raw
To: gentoo-commits
commit: 56aaaa2cd85145b33cbe796bd7e3ebe7e469efb8
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 7 20:29:06 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Mar 7 22:38:44 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56aaaa2c
dev-python/lmdb: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/lmdb/Manifest | 1 -
dev-python/lmdb/files/lmdb-1.0.0-pypy3.patch | 40 ----------------------------
dev-python/lmdb/lmdb-1.0.0.ebuild | 40 ----------------------------
dev-python/lmdb/lmdb-1.1.1.ebuild | 36 -------------------------
4 files changed, 117 deletions(-)
diff --git a/dev-python/lmdb/Manifest b/dev-python/lmdb/Manifest
index c647935a9e8..2f2eaef514a 100644
--- a/dev-python/lmdb/Manifest
+++ b/dev-python/lmdb/Manifest
@@ -1,3 +1,2 @@
-DIST lmdb-1.0.0.tar.gz 876673 BLAKE2B 33fdf7dd344e42412b756f7c6d42c291f94bb2410366802b22b8045c8ae5ff4f73f41cdc655e750f0ccb9f547f70b190bb9b584d7858edd07c1fb274bff684eb SHA512 3a4dba711ce5a3795a7f916cf04d5c7e9d4b5df30161dcbd02b53bcec73b96450865fb2bd8fe4a9ca2b5060531d03cefd9ea19aa09f139f93c3d03b2516f5632
DIST lmdb-1.1.0.tar.gz 880212 BLAKE2B 5f038c704061bb7915b0b0926c2dc60a5dd4931a70a1bf1041508363e036ae0553e22c52f8c956bebb05a27fad751c3b84c4a2b9fd6158fd8b6bd346e3efe7b4 SHA512 19573626a24fcea17c72641ce4491cf9e0901fa4a463ad5da6244191f28e4d9680d903fc2f87fe4a6b607f2a6a3a6bc644d5c1fc6e568394eb9822face30dfae
DIST lmdb-1.1.1.tar.gz 880359 BLAKE2B b202154eae151d3748e9e90fcb71a3c8a722923c2583e469ef1a0017a4c3dfdfd62d99db24fb79e7da1fc7c6a4fb695d9db5ed6a67750967788a12fe0ba24761 SHA512 4621c87dd646f8ca37f4cdc40ffa2fe809ca4da21b335856e50e6d0ae07f3828d424cde9cc383e4cdc761cd9311eb504d67678a33de51c1931a006ec86a2fcd0
diff --git a/dev-python/lmdb/files/lmdb-1.0.0-pypy3.patch b/dev-python/lmdb/files/lmdb-1.0.0-pypy3.patch
deleted file mode 100644
index 008213ac46c..00000000000
--- a/dev-python/lmdb/files/lmdb-1.0.0-pypy3.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 2d0f93984f53c19925f07d742584f5e3e69d7902 Mon Sep 17 00:00:00 2001
-From: Nic Watson <github@nicwatson.org>
-Date: Wed, 7 Oct 2020 12:44:30 -0400
-Subject: [PATCH] Get pypy3 passing tests
-
----
- .travis.yml | 2 +-
- tests/cursor_test.py | 8 ++++----
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/tests/cursor_test.py b/tests/cursor_test.py
-index acfb0ea..22dd6f8 100644
---- a/tests/cursor_test.py
-+++ b/tests/cursor_test.py
-@@ -245,7 +245,7 @@ def setUp(self, redo=False):
- self.txn = self.env.begin(write=True)
- self.c = self.txn.cursor()
-
-- @unittest.skipIf(sys.platform != 'linux', "test only works on Linux")
-+ @unittest.skipIf(not sys.platform.startswith('linux'), "test only works on Linux")
- def test_preload(self):
- """
- Test that reading just the key doesn't prefault the value contents, but
-@@ -264,13 +264,13 @@ def test_preload(self):
- self.path, self.env = testlib.temp_env(path=self.path, writemap=True)
- self.txn = self.env.begin(write=True, buffers=True)
- self.c = self.txn.cursor()
-- minflts_before = resource.getrusage(resource.RUSAGE_THREAD)[6]
-+ minflts_before = resource.getrusage(resource.RUSAGE_SELF)[6]
- self.c.set_key(B('a'))
- assert self.c.key() == B('a')
-- minflts_after_key = resource.getrusage(resource.RUSAGE_THREAD)[6]
-+ minflts_after_key = resource.getrusage(resource.RUSAGE_SELF)[6]
-
- self.c.value()
-- minflts_after_value = resource.getrusage(resource.RUSAGE_THREAD)[6]
-+ minflts_after_value = resource.getrusage(resource.RUSAGE_SELF)[6]
-
- epsilon = 20
-
diff --git a/dev-python/lmdb/lmdb-1.0.0.ebuild b/dev-python/lmdb/lmdb-1.0.0.ebuild
deleted file mode 100644
index d6698037079..00000000000
--- a/dev-python/lmdb/lmdb-1.0.0.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( pypy3 python3_{7..9} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python bindings for the Lightning Database"
-HOMEPAGE="https://github.com/jnwatson/py-lmdb/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="OPENLDAP"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux"
-
-RDEPEND="dev-db/lmdb:="
-DEPEND="${RDEPEND}"
-
-distutils_enable_sphinx docs
-distutils_enable_tests pytest
-
-PATCHES=(
- # https://github.com/jnwatson/py-lmdb/commit/2d0f93984f53c19925f07d742584f5e3e69d7902
- "${FILESDIR}/${P}-pypy3.patch"
-)
-
-python_compile() {
- LMDB_FORCE_SYSTEM=1 distutils-r1_python_compile
-}
-
-python_test() {
- pytest tests -vv || die "Tests fail with ${EPYTHON}"
-}
-
-python_install() {
- # This is required when the CFFI extension is used (for PyPy3)
- LMDB_FORCE_SYSTEM=1 distutils-r1_python_install
-}
diff --git a/dev-python/lmdb/lmdb-1.1.1.ebuild b/dev-python/lmdb/lmdb-1.1.1.ebuild
deleted file mode 100644
index be8e1065ac2..00000000000
--- a/dev-python/lmdb/lmdb-1.1.1.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( pypy3 python3_{7..9} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python bindings for the Lightning Database"
-HOMEPAGE="https://github.com/jnwatson/py-lmdb/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="OPENLDAP"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
-
-# TODO: switch to >=0.9.28 when available
-RDEPEND="<dev-db/lmdb-0.9.27:="
-DEPEND="${RDEPEND}"
-
-distutils_enable_sphinx docs
-distutils_enable_tests pytest
-
-python_compile() {
- LMDB_FORCE_SYSTEM=1 distutils-r1_python_compile
-}
-
-python_test() {
- pytest tests -vv || die "Tests fail with ${EPYTHON}"
-}
-
-python_install() {
- # This is required when the CFFI extension is used (for PyPy3)
- LMDB_FORCE_SYSTEM=1 distutils-r1_python_install
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-07 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-09 12:43 [gentoo-commits] repo/gentoo:master commit in: dev-python/lmdb/, dev-python/lmdb/files/ Louis Sautier
-- strict thread matches above, loose matches on Subject: below --
2021-03-07 22:39 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox