public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-lzo/, dev-python/python-lzo/files/
@ 2022-01-28 17:06 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2022-01-28 17:06 UTC (permalink / raw
  To: gentoo-commits

commit:     d7f4cb5fb8d7eec20a09e272fc8870f6b92b4228
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 28 16:45:07 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 28 17:06:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7f4cb5f

dev-python/python-lzo: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/python-lzo/Manifest                     |   1 -
 .../files/python-lzo-1.12-fix-py3.10.patch         | 159 ---------------------
 dev-python/python-lzo/python-lzo-1.12-r2.ebuild    |  34 -----
 3 files changed, 194 deletions(-)

diff --git a/dev-python/python-lzo/Manifest b/dev-python/python-lzo/Manifest
index 161089c5e52d..68338d30a0d2 100644
--- a/dev-python/python-lzo/Manifest
+++ b/dev-python/python-lzo/Manifest
@@ -1,2 +1 @@
-DIST python-lzo-1.12.tar.gz 14042 BLAKE2B 7375e9b200a17cc1ad2c4dfdbe6491082af8d120b2b659b1e9bbff00eaae568e04dc12e5c13de3a028267a1e8e02bd1522a9335db73fa6a5a4ebc7ca4b341fff SHA512 811bdb282cfaf33427ad641d0342900c5af1f17b7033d76593288c3846b0feefe6ef93253152add97b2d6420f937de2745c8e7508dadf33e72b11545cac3be4d
 DIST python-lzo-1.14.tar.gz 14050 BLAKE2B e1df6b842562064ca13ddbacb194047ca343694d480a5a65e7d2876ec98a4215b4badb3b2a839f308dea8624c162a0536f363c093bcb2e5b48c68b69fb472729 SHA512 036cf7199afe12cec8b9c7ee92134f58357e1f892870ade3a619541a69c9cc92155892d53bd43330732b848016c2997e096a9a492e52f15d04fa516ca7645b93

diff --git a/dev-python/python-lzo/files/python-lzo-1.12-fix-py3.10.patch b/dev-python/python-lzo/files/python-lzo-1.12-fix-py3.10.patch
deleted file mode 100644
index 17bad96d6278..000000000000
--- a/dev-python/python-lzo/files/python-lzo-1.12-fix-py3.10.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-diff --git a/lzomodule.c b/lzomodule.c
-index b5fa542..e9ca432 100644
---- a/lzomodule.c
-+++ b/lzomodule.c
-@@ -31,6 +31,8 @@
- 
- #define MODULE_VERSION  "1.12"
- 
-+#define PY_SSIZE_T_CLEAN
-+
- #include <Python.h>
- #include <lzo/lzo1x.h>
- 
-@@ -83,7 +85,7 @@ compress(PyObject *dummy, PyObject *args)
-     lzo_uint in_len;
-     lzo_uint out_len;
-     lzo_uint new_len;
--    int len;
-+    Py_ssize_t len;
-     int level = 1;
-     int header = 1;
-     int err;
-@@ -95,6 +97,16 @@ compress(PyObject *dummy, PyObject *args)
-     if (len < 0)
-         return NULL;
- 
-+    if (len > LZO_UINT_MAX) {
-+      PyErr_SetString(LzoError, "Input size is larger than LZO_UINT_MAX");
-+      return NULL;
-+    }
-+
-+    if ((len + len / 16 + 64 + 3) > LZO_UINT_MAX) {
-+      PyErr_SetString(LzoError, "Output size is larger than LZO_UINT_MAX");
-+      return NULL;
-+    }
-+
-     in_len = len;
-     out_len = in_len + in_len / 16 + 64 + 3;
- 
-@@ -189,7 +201,7 @@ decompress(PyObject *dummy, PyObject *args)
-     lzo_uint in_len;
-     lzo_uint out_len;
-     lzo_uint new_len;
--    int len;
-+    Py_ssize_t len;
-     int buflen = -1;
-     int header = 1;
-     int err;
-@@ -274,7 +286,7 @@ optimize(PyObject *dummy, PyObject *args)
-     lzo_uint in_len;
-     lzo_uint out_len;
-     lzo_uint new_len;
--    int len;
-+    Py_ssize_t len;
-     int err;
-     int header = 1;
-     int buflen = -1;
-@@ -356,7 +368,7 @@ static PyObject *
- adler32(PyObject *dummy, PyObject *args)
- {
-     char *buf;
--    int len;
-+    Py_ssize_t len;
-     unsigned long val = 1; /* == lzo_adler32(0, NULL, 0); */
- 
-     UNUSED(dummy);
-@@ -392,7 +404,7 @@ static PyObject *
- crc32(PyObject *dummy, PyObject *args)
- {
-     char *buf;
--    int len;
-+    Py_ssize_t len;
-     unsigned long val = 0; /* == lzo_crc32(0, NULL, 0); */
- 
-     UNUSED(dummy);
-diff --git a/tests/test.py b/tests/test.py
-index 9a96ce7..af761d9 100644
---- a/tests/test.py
-+++ b/tests/test.py
-@@ -96,11 +96,17 @@ def test_version():
- 
- def test_lzo():
-     yield gen, b"aaaaaaaaaaaaaaaaaaaaaaaa"
--    yield gen_raw, b"aaaaaaaaaaaaaaaaaaaaaaaa"
-     yield gen, b"abcabcabcabcabcabcabcabc"
--    yield gen_raw, b"abcabcabcabcabcabcabcabc"
-     yield gen, b"abcabcabcabcabcabcabcabc", 9
-+
-+
-+def test_lzo_raw():
-+    yield gen_raw, b"aaaaaaaaaaaaaaaaaaaaaaaa"
-+    yield gen_raw, b"abcabcabcabcabcabcabcabc"
-     yield gen_raw, b"abcabcabcabcabcabcabcabc", 9
-+
-+
-+def test_lzo_empty():
-     yield gen, b""
-     yield gen_raw, b""
- 
-@@ -113,41 +119,8 @@ def test_lzo_raw_big():
-     gen_raw(b" " * 131072)
- 
- 
--def main(args):
--    # display version information and module documentation
--    print("LZO version %s (0x%x), %s" % (lzo.LZO_VERSION_STRING, lzo.LZO_VERSION, lzo.LZO_VERSION_DATE))
--    print(lzo.__file__)
--    print()
--    print(lzo.__doc__)
--
--    # display additional module information
--    ## print dir(lzo)
--    ## print_modinfo()
--
--    # compress some simple strings
--    gen(b"aaaaaaaaaaaaaaaaaaaaaaaa")
--    gen_raw(b"aaaaaaaaaaaaaaaaaaaaaaaa")
--    gen(b"abcabcabcabcabcabcabcabc")
--    gen_raw(b"abcabcabcabcabcabcabcabc")
--    gen(b"abcabcabcabcabcabcabcabc", level=9)
--    gen_raw(b"abcabcabcabcabcabcabcabc", level=9)
--    gen(b" " * 131072)
--    gen_raw(b" " * 131072)
--    gen(b"")
--    gen_raw(b"")
--    print("Simple compression test passed.")
--
--    test_version()
--
--    # force an exception (because of invalid compressed data)
--    assert issubclass(lzo.error, Exception)
--    try:
--        x = lzo.decompress("xx")
--    except lzo.error:
--        pass
--    else:
--        print("Exception handling does NOT work !")
--    return 0
--
--if __name__ == '__main__':
--    sys.exit(main(sys.argv))
-+if sys.maxsize > 1<<32:
-+    # This test raises OverflowError on 32-bit Pythons. Compressing
-+    # this much data requires a 64-bit system.
-+    def test_lzo_compress_extremely_big():
-+        b = lzo.compress(bytes(bytearray((1024**3)*2)))
-diff --git a/tests/util.py b/tests/util.py
-index 0a2f4ed..c7bd5f0 100644
---- a/tests/util.py
-+++ b/tests/util.py
-@@ -45,7 +45,7 @@ def get_sys_path(p=None):
-     if p: p0 = p[0]
-     #
-     plat = get_platform()
--    plat_specifier = "%s-%s" % (plat, sys.version[:3])
-+    plat_specifier = "%s-%d.%d" % (plat, sys.version_info[0], sys.version_info[1])
-     ##print plat, plat_specifier
-     #
-     for prefix in (p0, os.curdir, os.pardir,):

diff --git a/dev-python/python-lzo/python-lzo-1.12-r2.ebuild b/dev-python/python-lzo/python-lzo-1.12-r2.ebuild
deleted file mode 100644
index 505104db3542..000000000000
--- a/dev-python/python-lzo/python-lzo-1.12-r2.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit distutils-r1 prefix
-
-DESCRIPTION="Python interface to lzo"
-HOMEPAGE="https://github.com/jd-boyd/python-lzo"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
-
-RDEPEND="dev-libs/lzo:2"
-DEPEND="${RDEPEND}"
-
-# We can't use pytest at the moment because the package uses "yield tests"
-# https://docs.pytest.org/en/6.2.x/deprecations.html#yield-tests
-distutils_enable_tests --install nose
-
-PATCHES=(
-	# Upstream commits: 52440984, e63333e5, 15c40595 and 0a4272fc
-	"${FILESDIR}/${P}-fix-py3.10.patch"
-)
-
-python_prepare_all() {
-	hprefixify setup.py
-	distutils-r1_python_prepare_all
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-lzo/, dev-python/python-lzo/files/
@ 2022-12-25 21:32 James Le Cuirot
  0 siblings, 0 replies; 3+ messages in thread
From: James Le Cuirot @ 2022-12-25 21:32 UTC (permalink / raw
  To: gentoo-commits

commit:     3152b6315ed64c84cd4a4bcc8cf583b6ff392aa2
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 25 21:31:53 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Dec 25 21:31:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3152b631

dev-python/python-lzo: Patch to migrate from dead nose to pytest

I've sent this upstream.

Closes: https://bugs.gentoo.org/888259
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../python-lzo/files/python-lzo-1.14-pytest.patch  | 71 ++++++++++++++++++++++
 dev-python/python-lzo/python-lzo-1.14-r1.ebuild    |  6 +-
 2 files changed, 76 insertions(+), 1 deletion(-)

diff --git a/dev-python/python-lzo/files/python-lzo-1.14-pytest.patch b/dev-python/python-lzo/files/python-lzo-1.14-pytest.patch
new file mode 100644
index 000000000000..2abaab19aab5
--- /dev/null
+++ b/dev-python/python-lzo/files/python-lzo-1.14-pytest.patch
@@ -0,0 +1,71 @@
+https://github.com/jd-boyd/python-lzo/pull/66
+
+diff --git a/setup.py b/setup.py
+index 033692d..e7e383d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -33,7 +33,7 @@ class TestCommand(Command):
+         raise SystemExit(
+             subprocess.call([sys.executable,
+                              '-m',
+-                             'nose']))
++                             'pytest']))
+ 
+ 
+ if sys.platform == "win32":
+@@ -91,7 +91,7 @@ setup_args = get_kw(
+     maintainer_email="jdboyd@jdboyd.net",
+     url="https://github.com/jd-boyd/python-lzo",
+     license="GNU General Public License (GPL)",
+-    tests_require=['nose'],
++    tests_require=['pytest'],
+     cmdclass={
+         'test': TestCommand
+     },
+diff --git a/tests/test.py b/tests/test_lzo.py
+similarity index 88%
+rename from tests/test.py
+rename to tests/test_lzo.py
+index af761d9..b9d5c88 100644
+--- a/tests/test.py
++++ b/tests/test_lzo.py
+@@ -32,6 +32,7 @@
+ 
+ from __future__ import print_function
+ 
++import pytest
+ import sys, string
+ 
+ # update sys.path when running in the build directory
+@@ -94,22 +95,20 @@ def test_version():
+     assert pkg_version == mod_version, \
+         "%r != %r" %(pkg_version, mod_version)
+ 
+-def test_lzo():
+-    yield gen, b"aaaaaaaaaaaaaaaaaaaaaaaa"
+-    yield gen, b"abcabcabcabcabcabcabcabc"
+-    yield gen, b"abcabcabcabcabcabcabcabc", 9
++@pytest.mark.parametrize("src, level", [(b"aaaaaaaaaaaaaaaaaaaaaaaa", 1), (b"abcabcabcabcabcabcabcabc", 1), (b"abcabcabcabcabcabcabcabc", 9)])
++def test_lzo(src, level):
++    gen(src, level)
+ 
+-
+-def test_lzo_raw():
+-    yield gen_raw, b"aaaaaaaaaaaaaaaaaaaaaaaa"
+-    yield gen_raw, b"abcabcabcabcabcabcabcabc"
+-    yield gen_raw, b"abcabcabcabcabcabcabcabc", 9
++@pytest.mark.parametrize("src, level", [(b"aaaaaaaaaaaaaaaaaaaaaaaa", 1), (b"abcabcabcabcabcabcabcabc", 1), (b"abcabcabcabcabcabcabcabc", 9)])
++def test_lzo_raw(src, level):
++    gen_raw(src, level)
+ 
+ 
+ def test_lzo_empty():
+-    yield gen, b""
+-    yield gen_raw, b""
++    gen(b"")
+ 
++def test_lzo_empty_raw():
++    gen_raw(b"")
+ 
+ def test_lzo_big():
+     gen(b" " * 131072)

diff --git a/dev-python/python-lzo/python-lzo-1.14-r1.ebuild b/dev-python/python-lzo/python-lzo-1.14-r1.ebuild
index 6493182b8432..6131a4803068 100644
--- a/dev-python/python-lzo/python-lzo-1.14-r1.ebuild
+++ b/dev-python/python-lzo/python-lzo-1.14-r1.ebuild
@@ -19,9 +19,13 @@ KEYWORDS="amd64 ~riscv x86 ~amd64-linux ~x86-linux"
 RDEPEND="dev-libs/lzo:2"
 DEPEND="${RDEPEND}"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-pytest.patch
+)
+
 # We can't use pytest at the moment because the package uses "yield tests"
 # https://docs.pytest.org/en/6.2.x/deprecations.html#yield-tests
-distutils_enable_tests nose
+distutils_enable_tests pytest
 
 python_prepare_all() {
 	hprefixify setup.py


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-lzo/, dev-python/python-lzo/files/
@ 2023-07-24 12:42 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2023-07-24 12:42 UTC (permalink / raw
  To: gentoo-commits

commit:     1105a5fade1ee6f82065372eb14bbaca17e2043b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 24 12:42:03 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jul 24 12:42:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1105a5fa

dev-python/python-lzo: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/python-lzo/Manifest                     |  1 -
 .../python-lzo/files/python-lzo-1.14-pytest.patch  | 71 ----------------------
 dev-python/python-lzo/python-lzo-1.14-r1.ebuild    | 34 -----------
 3 files changed, 106 deletions(-)

diff --git a/dev-python/python-lzo/Manifest b/dev-python/python-lzo/Manifest
index f014db482b3f..e2ce4ab8c4b5 100644
--- a/dev-python/python-lzo/Manifest
+++ b/dev-python/python-lzo/Manifest
@@ -1,2 +1 @@
-DIST python-lzo-1.14.tar.gz 14050 BLAKE2B e1df6b842562064ca13ddbacb194047ca343694d480a5a65e7d2876ec98a4215b4badb3b2a839f308dea8624c162a0536f363c093bcb2e5b48c68b69fb472729 SHA512 036cf7199afe12cec8b9c7ee92134f58357e1f892870ade3a619541a69c9cc92155892d53bd43330732b848016c2997e096a9a492e52f15d04fa516ca7645b93
 DIST python-lzo-1.15.tar.gz 17633 BLAKE2B 577c78feeced5fba833c27b212b621a4cd8c9d4fe2dfb44d93cfd2b0aa9e88ee66926ec47d129b75496936f55d65e99e816d00e110b1d70300639a3907d823fd SHA512 1c7889f01b4809e7023804b702ac35a59e45df735865ff50449c69b414966c9f928c254ef7dde9e28fcc44ba4ac12df220bd6a6d34c0d274123f59c65ce3c5fe

diff --git a/dev-python/python-lzo/files/python-lzo-1.14-pytest.patch b/dev-python/python-lzo/files/python-lzo-1.14-pytest.patch
deleted file mode 100644
index 2abaab19aab5..000000000000
--- a/dev-python/python-lzo/files/python-lzo-1.14-pytest.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-https://github.com/jd-boyd/python-lzo/pull/66
-
-diff --git a/setup.py b/setup.py
-index 033692d..e7e383d 100644
---- a/setup.py
-+++ b/setup.py
-@@ -33,7 +33,7 @@ class TestCommand(Command):
-         raise SystemExit(
-             subprocess.call([sys.executable,
-                              '-m',
--                             'nose']))
-+                             'pytest']))
- 
- 
- if sys.platform == "win32":
-@@ -91,7 +91,7 @@ setup_args = get_kw(
-     maintainer_email="jdboyd@jdboyd.net",
-     url="https://github.com/jd-boyd/python-lzo",
-     license="GNU General Public License (GPL)",
--    tests_require=['nose'],
-+    tests_require=['pytest'],
-     cmdclass={
-         'test': TestCommand
-     },
-diff --git a/tests/test.py b/tests/test_lzo.py
-similarity index 88%
-rename from tests/test.py
-rename to tests/test_lzo.py
-index af761d9..b9d5c88 100644
---- a/tests/test.py
-+++ b/tests/test_lzo.py
-@@ -32,6 +32,7 @@
- 
- from __future__ import print_function
- 
-+import pytest
- import sys, string
- 
- # update sys.path when running in the build directory
-@@ -94,22 +95,20 @@ def test_version():
-     assert pkg_version == mod_version, \
-         "%r != %r" %(pkg_version, mod_version)
- 
--def test_lzo():
--    yield gen, b"aaaaaaaaaaaaaaaaaaaaaaaa"
--    yield gen, b"abcabcabcabcabcabcabcabc"
--    yield gen, b"abcabcabcabcabcabcabcabc", 9
-+@pytest.mark.parametrize("src, level", [(b"aaaaaaaaaaaaaaaaaaaaaaaa", 1), (b"abcabcabcabcabcabcabcabc", 1), (b"abcabcabcabcabcabcabcabc", 9)])
-+def test_lzo(src, level):
-+    gen(src, level)
- 
--
--def test_lzo_raw():
--    yield gen_raw, b"aaaaaaaaaaaaaaaaaaaaaaaa"
--    yield gen_raw, b"abcabcabcabcabcabcabcabc"
--    yield gen_raw, b"abcabcabcabcabcabcabcabc", 9
-+@pytest.mark.parametrize("src, level", [(b"aaaaaaaaaaaaaaaaaaaaaaaa", 1), (b"abcabcabcabcabcabcabcabc", 1), (b"abcabcabcabcabcabcabcabc", 9)])
-+def test_lzo_raw(src, level):
-+    gen_raw(src, level)
- 
- 
- def test_lzo_empty():
--    yield gen, b""
--    yield gen_raw, b""
-+    gen(b"")
- 
-+def test_lzo_empty_raw():
-+    gen_raw(b"")
- 
- def test_lzo_big():
-     gen(b" " * 131072)

diff --git a/dev-python/python-lzo/python-lzo-1.14-r1.ebuild b/dev-python/python-lzo/python-lzo-1.14-r1.ebuild
deleted file mode 100644
index c26a43f314d0..000000000000
--- a/dev-python/python-lzo/python-lzo-1.14-r1.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYPI_NO_NORMALIZE=1
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit distutils-r1 prefix pypi
-
-DESCRIPTION="Python interface to lzo"
-HOMEPAGE="https://github.com/jd-boyd/python-lzo"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~riscv x86 ~amd64-linux ~x86-linux"
-
-RDEPEND="dev-libs/lzo:2"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-pytest.patch
-)
-
-# We can't use pytest at the moment because the package uses "yield tests"
-# https://docs.pytest.org/en/6.2.x/deprecations.html#yield-tests
-distutils_enable_tests pytest
-
-python_prepare_all() {
-	hprefixify setup.py
-	distutils-r1_python_prepare_all
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-24 12:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-25 21:32 [gentoo-commits] repo/gentoo:master commit in: dev-python/python-lzo/, dev-python/python-lzo/files/ James Le Cuirot
  -- strict thread matches above, loose matches on Subject: below --
2023-07-24 12:42 Michał Górny
2022-01-28 17:06 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