diff options
Diffstat (limited to 'dev-python/lmdb')
-rw-r--r-- | dev-python/lmdb/Manifest | 7 | ||||
-rw-r--r-- | dev-python/lmdb/files/lmdb-1.0.0-pypy3.patch | 40 | ||||
-rw-r--r-- | dev-python/lmdb/lmdb-0.92.ebuild | 24 | ||||
-rw-r--r-- | dev-python/lmdb/lmdb-1.0.0.ebuild | 40 | ||||
-rw-r--r-- | dev-python/lmdb/metadata.xml | 3 |
5 files changed, 86 insertions, 28 deletions
diff --git a/dev-python/lmdb/Manifest b/dev-python/lmdb/Manifest index 6ed647877078..eb614609b5ba 100644 --- a/dev-python/lmdb/Manifest +++ b/dev-python/lmdb/Manifest @@ -1,3 +1,4 @@ -DIST lmdb-0.92.tar.gz 155720 BLAKE2B fa991dba144e636d395e264c70de61bf6e1391bed589b8e67075eb604ad3cde7bc1593f596f884e13ef4c744efddac93467eb0e9d7e79d445a71e21e1f5541f7 SHA512 5177abe0c441fb9067ad84de0cafda960113042404507eaf36194efe614fbc9fda37668b9d8a07d4a7f674b0c1a267194ddfb241834a3b1db0d8026f53841cf2 -EBUILD lmdb-0.92.ebuild 569 BLAKE2B 67b60c349456abd4d8ba7f78013d2fc8fcb38ff1992128c1c9d4c1ae680d0b2f68850f0cc3a82ef8d946926bd803d47394b17a041553e67e76bf9c7274bea1c6 SHA512 d292090a491df1bcd155186b1a2eb93eeec51f556bf83a5c909af8c8ab43b956e5e8e5d64a5a8e99199238d32ee7421ec016864f60e3d3a1721e384b2cea22a3 -MISC metadata.xml 369 BLAKE2B 753c2fcd809cb0b69b60f4581421e3d2abb40158dcf3931a70c2c2adaeaf22f5558707a6dc39ec2b9d8724d9fa3bbc370cf790a8bb550d00d59e10cda643ac88 SHA512 4b2ad4e50acca757e8a1ff4e659ae99c8c42788ba6cc1e1d503cb371cb897443e6fbe3b7c2f7f8ca0b6409da9e7a7961a644aaf615d306da8172687caddff3bd +AUX lmdb-1.0.0-pypy3.patch 1657 BLAKE2B faeda530b91755269415c7c2b2015d68e4567acb01c2375ed98073a0f4f74be6ce0494a28dcc7e57be4409645ea629d75b06e59bb605ee35364131a4e7d73ad8 SHA512 6bfb0b5de254480fce86bd7360529cd1d419eaf100359fcd5c315cdba93b47b0e16ec1f712e62f3dc1147ead22beeda437804250a4caa40c9227e4f9ad11cfb9 +DIST lmdb-1.0.0.tar.gz 876673 BLAKE2B 33fdf7dd344e42412b756f7c6d42c291f94bb2410366802b22b8045c8ae5ff4f73f41cdc655e750f0ccb9f547f70b190bb9b584d7858edd07c1fb274bff684eb SHA512 3a4dba711ce5a3795a7f916cf04d5c7e9d4b5df30161dcbd02b53bcec73b96450865fb2bd8fe4a9ca2b5060531d03cefd9ea19aa09f139f93c3d03b2516f5632 +EBUILD lmdb-1.0.0.ebuild 934 BLAKE2B 2952fbf9a45d77503e3ecb582b45dee3ca02d381a14288ff6ee756192cb03433d44268c58743ddbb591a05db415864e7b68400b9e24ab83615ae6cde885c27d8 SHA512 b3d6c4a8c77c579b2cada50feecf91411a08d74c011c385e7e91373e74e6114a22815ac9fd83624fabe4b934734092a0ef202f33c1f65e7f3f3cf3194c97957b +MISC metadata.xml 419 BLAKE2B 7bb3bd08439249e8bcb7f64d91a707245dd2c32eefed576a4389019217c304173754628f1fdd82f147e6f7a077e2abcb6062dcbaf76d0547c8d710c8d16d0a64 SHA512 700345b4a50d602e35c983fadf73eee5da01b7d9dc4a647966277aeb7fe1fb26f583c681acf1718060dff14b195df7fa4689bad2451c475d1883b66e223ad29d 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 000000000000..008213ac46c6 --- /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-0.92.ebuild b/dev-python/lmdb/lmdb-0.92.ebuild deleted file mode 100644 index c3be0c1d61f7..000000000000 --- a/dev-python/lmdb/lmdb-0.92.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# 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 - -DESCRIPTION="Python bindings for the Lightning Database" -HOMEPAGE="https://github.com/dw/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" -IUSE="" - -RDEPEND="dev-db/lmdb:=" -DEPEND="${RDEPEND} - dev-python/setuptools[${PYTHON_USEDEP}]" - -python_compile() { - LMDB_FORCE_SYSTEM=1 distutils-r1_python_compile -} diff --git a/dev-python/lmdb/lmdb-1.0.0.ebuild b/dev-python/lmdb/lmdb-1.0.0.ebuild new file mode 100644 index 000000000000..8e3f0f10d802 --- /dev/null +++ b/dev-python/lmdb/lmdb-1.0.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( pypy3 python3_{6..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/metadata.xml b/dev-python/lmdb/metadata.xml index 06b93698919c..becfa11ea49d 100644 --- a/dev-python/lmdb/metadata.xml +++ b/dev-python/lmdb/metadata.xml @@ -7,6 +7,7 @@ </maintainer> <upstream> <remote-id type="pypi">lmdb</remote-id> - <remote-id type="github">dw/py-lmdb</remote-id> + <remote-id type="github">jnwatson/py-lmdb</remote-id> + <doc>https://lmdb.readthedocs.io/</doc> </upstream> </pkgmetadata> |