Skip to contentSkip to conversation

package/mupdf: bump to version 1.23.8

PATCH In review James Hilliard 3 participants 14 messages Jan 10, 2024 – Feb 9, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 package/mupdf: bump to version 1.23.8

Drop patch which is now upstream.

---
 ...issing-limits.h-include-for-UINT_MAX.patch | 70 -------------------
 package/mupdf/mupdf.hash                      |  4 +-
 package/mupdf/mupdf.mk                        |  2 +-
 3 files changed, 3 insertions(+), 73 deletions(-)
 delete mode 100644 package/mupdf/0001-Add-missing-limits.h-include-for-UINT_MAX.patch
package/mupdf/0001-Add-missing-limits.h-include-for-UINT_MAX.patch deleted +0 -70
deleted file mode 100644
index 95f2f86666..0000000000
@@ -1,70 +0,0 @@
-From ebce9f1b129ebc8f2b17afa02a4ffcb9453c11d9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= <[email protected]>
-Date: Mon, 24 Apr 2023 17:27:35 +0200
-Subject: [PATCH] Add missing limits.h include for UINT_MAX
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-encode-basic.c uses 'UINT_MAX', which is available in the 'limits.h'
-header.
-
-In some configurations that build with zlib from [1], by chance
-limits.h gets indirectly included when including 'z-imp.h' (the
-includes are: 'z-imp.h' -> 'zlib.h' -> 'zconf.h' -> 'limits.h'), so
-the build succeeds.
-
-When using other zlib implementations however (for example from [2]),
-limits.h is not necessarily included indirectly, which leads to the
-build failing in the following way:
-
-source/fitz/encode-basic.c: In function 'deflate_write':
-source/fitz/encode-basic.c:343:27: error: 'UINT_MAX' undeclared (first use in this function)
-  343 |         newbufsize = n >= UINT_MAX ? UINT_MAX : deflateBound(&state->z, n);
-      |                           ^~~~~~~~
-source/fitz/encode-basic.c:26:1: note: 'UINT_MAX' is defined in header '<limits.h>'; did you forget to '#include <limits.h>'?
-
-Add the missing include, so that the build succeeds no matter if zlib
-indirectly includes 'limit.h' or not.
-
-Similarly, also add it in output-ps.c where it's also missing.
-
-[1]: https://zlib.net/
-[2]: https://github.com/zlib-ng/zlib-ng
-
-Signed-off-by: Raphaël Mélotte <[email protected]>
-Upstream: https://bugs.ghostscript.com/show_bug.cgi?id=706667
----
- source/fitz/encode-basic.c | 2 ++
- source/fitz/output-ps.c    | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/source/fitz/encode-basic.c b/source/fitz/encode-basic.c
-index 03a4ff76b..84f0c35e6 100644
---- a/source/fitz/encode-basic.c
-+++ b/source/fitz/encode-basic.c
-@@ -24,6 +24,8 @@
- 
- #include "z-imp.h"
- 
-+#include <limits.h>
-+
- struct ahx
- {
- 	fz_output *chain;
-diff --git a/source/fitz/output-ps.c b/source/fitz/output-ps.c
-index ef22c3cd6..3dc8ea17d 100644
---- a/source/fitz/output-ps.c
-+++ b/source/fitz/output-ps.c
-@@ -24,6 +24,8 @@
- 
- #include "z-imp.h"
- 
-+#include <limits.h>
-+
- typedef struct ps_band_writer_s
- {
- 	fz_band_writer super;
--- 
-2.39.1
-
package/mupdf/mupdf.hash +2 -2
index 1f636097ed..8acd9afa8a 100644
@@ -1,8 +1,8 @@
 # From https://mupdf.com/downloads/index.html:
-sha1  b9907729d604f0bf3846b45cd5891e10d7a66e24  mupdf-1.22.0-source.tar.lz
+sha1  bff29452eb30e477e543196971936874454ff9d5  mupdf-1.23.8-source.tar.lz
 
 # Locally computed:
-sha256  bed78a0abf8496b30c523497292de979db633eca57e02f6cd0f3c7c042551c3e  mupdf-1.22.0-source.tar.lz
+sha256  9373fc293e0ae18d87d302d74a3db071462618e9a0b60ae29c2132e636ac1554  mupdf-1.23.8-source.tar.lz
 
 # Hash for license files:
 sha256  57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6  COPYING
package/mupdf/mupdf.mk +1 -1
index 08894d7980..d462a2e481 100644
@@ -5,7 +5,7 @@
 ################################################################################
 
 # python-pymupdf's version must match mupdf's version
-MUPDF_VERSION = 1.22.0
+MUPDF_VERSION = 1.23.8
 MUPDF_SOURCE = mupdf-$(MUPDF_VERSION)-source.tar.lz
 MUPDF_SITE = https://mupdf.com/downloads/archive
 MUPDF_LICENSE = AGPL-3.0+
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/6 package/python-distro: add host build

This will be needed by the upcoming python-scikit-build package.

---
 package/python-distro/python-distro.mk | 1 +
 1 file changed, 1 insertion(+)
package/python-distro/python-distro.mk +1 -0
index e079d8e265..947063da76 100644
@@ -12,3 +12,4 @@ PYTHON_DISTRO_LICENSE_FILES = LICENSE
 PYTHON_DISTRO_SETUP_TYPE = setuptools
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 3/6 package/python-scikit-build: new package

In reply to James Hilliard
---
 .../python-scikit-build.hash                  |  5 +++++
 .../python-scikit-build.mk                    | 22 +++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 package/python-scikit-build/python-scikit-build.hash
 create mode 100644 package/python-scikit-build/python-scikit-build.mk
package/python-scikit-build/python-scikit-build.hash new file +5 -0
new file mode 100644
index 0000000000..cbdf02bafc
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/scikit-build/json
+md5  93a106577d5ebf3122f5383b97fb6abf  scikit_build-0.17.6.tar.gz
+sha256  b51a51a36b37c42650994b5047912f59b22e3210b23e321f287611f9ef6e5c9d  scikit_build-0.17.6.tar.gz
+# Locally computed sha256 checksums
+sha256  2a706f2cde09d2d589900dafc5393b926b570f18dcf4259765631d272f039761  LICENSE
package/python-scikit-build/python-scikit-build.mk new file +22 -0
new file mode 100644
index 0000000000..36840fcaea
@@ -0,0 +1,22 @@
+################################################################################
+#
+# python-scikit-build
+#
+################################################################################
+
+PYTHON_SCIKIT_BUILD_VERSION = 0.17.6
+PYTHON_SCIKIT_BUILD_SOURCE = scikit_build-$(PYTHON_SCIKIT_BUILD_VERSION).tar.gz
+PYTHON_SCIKIT_BUILD_SITE = https://files.pythonhosted.org/packages/85/05/dc8f28b19f3f06b8a157a47f01f395444f0bae234c4d44674453fa7eeae3
+PYTHON_SCIKIT_BUILD_SETUP_TYPE = pep517
+PYTHON_SCIKIT_BUILD_LICENSE = MIT
+PYTHON_SCIKIT_BUILD_LICENSE_FILES = LICENSE
+HOST_PYTHON_SCIKIT_BUILD_DEPENDENCIES = \
+	host-python-distro \
+	host-python-hatchling \
+	host-python-hatch-fancy-pypi-readme \
+	host-python-hatch-vcs \
+	host-python-packaging \
+	host-python-setuptools \
+	host-python-wheel
+
+$(eval $(host-python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH 4/6 package/python-swig: new package

In reply to James Hilliard
---
 package/python-swig/python-swig.hash |  5 +++++
 package/python-swig/python-swig.mk   | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 package/python-swig/python-swig.hash
 create mode 100644 package/python-swig/python-swig.mk
package/python-swig/python-swig.hash new file +5 -0
new file mode 100644
index 0000000000..d60477f602
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/swig/json
+md5  c2bf820a545f333d47b7be513baaee3c  swig-4.1.1.post1.tar.gz
+sha256  5cbf2d4dfc413f74cac197704296a9ef065a3f81c7b3792ff11a56d312c4f652  swig-4.1.1.post1.tar.gz
+# Locally computed sha256 checksums
+sha256  73ba74dfaa520b49a401b5d21459a8523a146f3b7518a833eea5efa85130bf68  LICENSE
package/python-swig/python-swig.mk new file +17 -0
new file mode 100644
index 0000000000..89ede170c8
@@ -0,0 +1,17 @@
+################################################################################
+#
+# python-swig
+#
+################################################################################
+
+PYTHON_SWIG_VERSION = 4.1.1.post1
+PYTHON_SWIG_SOURCE = swig-$(PYTHON_SWIG_VERSION).tar.gz
+PYTHON_SWIG_SITE = https://files.pythonhosted.org/packages/da/b8/d1bfba3d7f75eeca60ecdcb2c214e5cdebb7477437d45db77b6dafee80f9
+PYTHON_SWIG_SETUP_TYPE = setuptools
+PYTHON_SWIG_LICENSE = Apache-2.0
+PYTHON_SWIG_LICENSE_FILES = LICENSE
+HOST_PYTHON_SWIG_DEPENDENCIES = \
+	host-python-scikit-build \
+	host-python-setuptools-scm
+
+$(eval $(host-python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Re: [Buildroot] [PATCH 4/6] package/python-swig: new package

James, All,

On 2024-01-10 02:38 -0700, James Hilliard spake thusly:

Quoted 1 line

What's the difference with the swig package we already have?

On PyPi, the package you are adding is called just swig, and the page on PyPi [0] redirects to the project's homepage [1] that is the same as the homepage for our package/swig/, but the repository it pints to is different [2] rather than the one from the swig homepage [3].

The description for the swig-on-pypi repository states:

A project that packages SWIG as a Python package, enabling swig to be installed from PyPI:
pip install swig

or used as part of build-system.requires in a pyproject.toml file:
[build-system]
requires = ["swig"]

So, here are a few questions:

- can we instead us the existing package/swig to provide the same functionality as python-swig? I see there is a --enable-python3 flag, at least.

- if not, then will the two conflict, i.e: will python-swig install the same set of files as swig does, even partially?

- if not, do we need to keep both versions in sync? Currently, package/swig is still only at 4.1.1.

[0] https://pypi.org/project/swig/
[1] https://swig.org/
[2] https://github.com/nightlark/swig-pypi
[3] https://github.com/swig/swig

Regards,
Yann E. MORIN.

Quoted 48 lines
---
 package/python-swig/python-swig.hash |  5 +++++
 package/python-swig/python-swig.mk   | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 package/python-swig/python-swig.hash
 create mode 100644 package/python-swig/python-swig.mk
package/python-swig/python-swig.hash new file +5 -0
new file mode 100644
index 0000000000..d60477f602
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/swig/json
+md5  c2bf820a545f333d47b7be513baaee3c  swig-4.1.1.post1.tar.gz
+sha256  5cbf2d4dfc413f74cac197704296a9ef065a3f81c7b3792ff11a56d312c4f652  swig-4.1.1.post1.tar.gz
+# Locally computed sha256 checksums
+sha256  73ba74dfaa520b49a401b5d21459a8523a146f3b7518a833eea5efa85130bf68  LICENSE
package/python-swig/python-swig.mk new file +17 -0
new file mode 100644
index 0000000000..89ede170c8
@@ -0,0 +1,17 @@
+################################################################################
+#
+# python-swig
+#
+################################################################################
+
+PYTHON_SWIG_VERSION = 4.1.1.post1
+PYTHON_SWIG_SOURCE = swig-$(PYTHON_SWIG_VERSION).tar.gz
+PYTHON_SWIG_SITE = https://files.pythonhosted.org/packages/da/b8/d1bfba3d7f75eeca60ecdcb2c214e5cdebb7477437d45db77b6dafee80f9
+PYTHON_SWIG_SETUP_TYPE = setuptools
+PYTHON_SWIG_LICENSE = Apache-2.0
+PYTHON_SWIG_LICENSE_FILES = LICENSE
+HOST_PYTHON_SWIG_DEPENDENCIES = \
+	host-python-scikit-build \
+	host-python-setuptools-scm
+
+$(eval $(host-python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

Re: [Buildroot] [PATCH 4/6] package/python-swig: new package

Quoted 23 lines · Yann E. MORIN

James, All,

On 2024-01-10 02:38 -0700, James Hilliard spake thusly:

Quoted 1 line

What's the difference with the swig package we already have?

On PyPi, the package you are adding is called just swig, and the page on PyPi [0] redirects to the project's homepage [1] that is the same as the homepage for our package/swig/, but the repository it pints to is different [2] rather than the one from the swig homepage [3].

The description for the swig-on-pypi repository states:

A project that packages SWIG as a Python package, enabling swig to be installed from PyPI:
pip install swig

or used as part of build-system.requires in a pyproject.toml file:
[build-system]
requires = ["swig"]

Quoted 5 lines

So, here are a few questions:

- can we instead us the existing package/swig to provide the same functionality as python-swig? I see there is a --enable-python3 flag, at least.

I don't think so since we need to provide the right python package for the pep517 build-system.

Quoted 3 lines

- if not, then will the two conflict, i.e: will python-swig install the same set of files as swig does, even partially?

Didn't seem to cause issues from what I could tell.

Quoted 3 lines

- if not, do we need to keep both versions in sync? Currently, package/swig is still only at 4.1.1.

Seemed to work so I presume they don't need to be.

Quoted 60 lines

[0] https://pypi.org/project/swig/
[1] https://swig.org/
[2] https://github.com/nightlark/swig-pypi
[3] https://github.com/swig/swig

Regards,
Yann E. MORIN.

Quoted 44 lines
---
 package/python-swig/python-swig.hash |  5 +++++
 package/python-swig/python-swig.mk   | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 package/python-swig/python-swig.hash
 create mode 100644 package/python-swig/python-swig.mk
package/python-swig/python-swig.hash new file +5 -0
new file mode 100644
index 0000000000..d60477f602
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/swig/json
+md5  c2bf820a545f333d47b7be513baaee3c  swig-4.1.1.post1.tar.gz
+sha256  5cbf2d4dfc413f74cac197704296a9ef065a3f81c7b3792ff11a56d312c4f652  swig-4.1.1.post1.tar.gz
+# Locally computed sha256 checksums
+sha256  73ba74dfaa520b49a401b5d21459a8523a146f3b7518a833eea5efa85130bf68  LICENSE
package/python-swig/python-swig.mk new file +17 -1
new file mode 100644
index 0000000000..89ede170c8
@@ -0,0 +1,17 @@
+################################################################################
+#
+# python-swig
+#
+################################################################################
+
+PYTHON_SWIG_VERSION = 4.1.1.post1
+PYTHON_SWIG_SOURCE = swig-$(PYTHON_SWIG_VERSION).tar.gz
+PYTHON_SWIG_SITE = https://files.pythonhosted.org/packages/da/b8/d1bfba3d7f75eeca60ecdcb2c214e5cdebb7477437d45db77b6dafee80f9
+PYTHON_SWIG_SETUP_TYPE = setuptools
+PYTHON_SWIG_LICENSE = Apache-2.0
+PYTHON_SWIG_LICENSE_FILES = LICENSE
+HOST_PYTHON_SWIG_DEPENDENCIES = \
+     host-python-scikit-build \
+     host-python-setuptools-scm
+
+$(eval $(host-python-package))
--

2.34.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

Quoted 5 lines
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#6 lore raw

Re: [Buildroot] [PATCH 4/6] package/python-swig: new package

James, All,

On 2024-01-10 04:30 -0700, James Hilliard spake thusly:

Quoted 4 lines · Yann E. MORIN
Quoted 3 lines

On 2024-01-10 02:38 -0700, James Hilliard spake thusly:

Quoted 1 line

What's the difference with the swig package we already have?

[--SNIP--]

Quoted 4 lines
Quoted 3 lines

- can we instead us the existing package/swig to provide the same functionality as python-swig? I see there is a --enable-python3 flag, at least.

I don't think so

This is not very assertive...

Quoted 2 lines

since we need to provide the right python package for the pep517 build-system.

I don't know what that means.

Quoted 3 lines
Quoted 2 lines

- if not, then will the two conflict, i.e: will python-swig install the same set of files as swig does, even partially?

Didn't seem to cause issues from what I could tell.

Ditto, not very assertive...

Quoted 3 lines
Quoted 2 lines

- if not, do we need to keep both versions in sync? Currently, package/swig is still only at 4.1.1.

Seemed to work so I presume they don't need to be.

But then again, it is not very assertive. The fact that the swig-pypi project follows the versioning of the swig project is however very intriguing, if they do in fact not require that they be kept in sync...

So, I had to spend some time looking into the (gory) details of python-swig. Let's say that this package could be the poster-child of everything that we do not like much in buildroot:

- it is a host-python-package, but in fact under the hood it just calls cmake

- which means that host-cmake should be a dependency, as well as quite a few others: host-bison, host-pcre2...

- it *downloads* those dependencies at build time when missing. it even tries to download a pre-built bison binary! Hey, look, it even downloads swig itself! ;-)

- it builds those dependencies

At which point I bailed out... All of the above could have been trivially found by running just this:

    $ make defconfig
    $ make host-swig-configure
    $ make host-swig-build

and looking at the output, which differs quite substantially from the usual python packages, and thus should have raised some eyebrows...

So, sorry, but this package really needs more investigations.

Regards,
Yann E. MORIN.

Quoted 64 lines
Quoted 64 lines

[0] https://pypi.org/project/swig/
[1] https://swig.org/
[2] https://github.com/nightlark/swig-pypi
[3] https://github.com/swig/swig

Regards,
Yann E. MORIN.

Quoted 44 lines
---
 package/python-swig/python-swig.hash |  5 +++++
 package/python-swig/python-swig.mk   | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 package/python-swig/python-swig.hash
 create mode 100644 package/python-swig/python-swig.mk
package/python-swig/python-swig.hash new file +5 -0
new file mode 100644
index 0000000000..d60477f602
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/swig/json
+md5  c2bf820a545f333d47b7be513baaee3c  swig-4.1.1.post1.tar.gz
+sha256  5cbf2d4dfc413f74cac197704296a9ef065a3f81c7b3792ff11a56d312c4f652  swig-4.1.1.post1.tar.gz
+# Locally computed sha256 checksums
+sha256  73ba74dfaa520b49a401b5d21459a8523a146f3b7518a833eea5efa85130bf68  LICENSE
package/python-swig/python-swig.mk new file +17 -1
new file mode 100644
index 0000000000..89ede170c8
@@ -0,0 +1,17 @@
+################################################################################
+#
+# python-swig
+#
+################################################################################
+
+PYTHON_SWIG_VERSION = 4.1.1.post1
+PYTHON_SWIG_SOURCE = swig-$(PYTHON_SWIG_VERSION).tar.gz
+PYTHON_SWIG_SITE = https://files.pythonhosted.org/packages/da/b8/d1bfba3d7f75eeca60ecdcb2c214e5cdebb7477437d45db77b6dafee80f9
+PYTHON_SWIG_SETUP_TYPE = setuptools
+PYTHON_SWIG_LICENSE = Apache-2.0
+PYTHON_SWIG_LICENSE_FILES = LICENSE
+HOST_PYTHON_SWIG_DEPENDENCIES = \
+     host-python-scikit-build \
+     host-python-setuptools-scm
+
+$(eval $(host-python-package))
--

2.34.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

Re: [Buildroot] [PATCH 4/6] package/python-swig: new package

James, All,

On 2024-01-10 15:13 +0100, Yann E. MORIN spake thusly:

Quoted 8 lines

On 2024-01-10 04:30 -0700, James Hilliard spake thusly:

Quoted 4 lines · Yann E. MORIN
Quoted 3 lines

On 2024-01-10 02:38 -0700, James Hilliard spake thusly:

Quoted 1 line

What's the difference with the swig package we already have?

    $ make defconfig
    $ make host-swig-configure
    $ make host-swig-build

Sorry, I meant 'host-python-swig' instead of 'host-swig', above.

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

Re: [Buildroot] [PATCH 4/6] package/python-swig: new package

In reply to Yann E. MORIN
Quoted 7 lines · Yann E. MORIN

James, All,

On 2024-01-10 04:30 -0700, James Hilliard spake thusly:

Quoted 3 lines · Yann E. MORIN
Quoted 2 lines

On 2024-01-10 02:38 -0700, James Hilliard spake thusly:

Quoted 1 line
Quoted 8 lines
Quoted 1 line
Quoted 1 line

What's the difference with the swig package we already have?

[--SNIP--]

Quoted 4 lines
Quoted 3 lines

- can we instead us the existing package/swig to provide the same functionality as python-swig? I see there is a --enable-python3 flag, at least.

I don't think so

This is not very assertive...

Well I'm thinking we may be able to get python-swig to use our existing swig, although probably need upstream to add some handling for that.

Quoted 5 lines
Quoted 3 lines

since we need to provide the right python package for the pep517 build-system.

I don't know what that means.

I mean, the pymupdf package is being built by a pep517 frontend which will enforce that these packages(which are their pypi package names) are present:

[build-system]
requires = ["libclang", "swig", "setuptools", "psutil"]

https://github.com/pymupdf/PyMuPDF/blob/1.23.9rc2/pyproject.toml#L2

Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

- if not, then will the two conflict, i.e: will python-swig install the same set of files as swig does, even partially?

Didn't seem to cause issues from what I could tell.

Ditto, not very assertive...

Yeah, I looked at it more, it seems to fully vendor everything.

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

- if not, do we need to keep both versions in sync? Currently, package/swig is still only at 4.1.1.

Seemed to work so I presume they don't need to be.

But then again, it is not very assertive. The fact that the swig-pypi project follows the versioning of the swig project is however very intriguing, if they do in fact not require that they be kept in sync...

Well since it's vendoring swig I suppose they currently wouldn't need to be kept in sync but that's a bit of a problem for sure.

Quoted 7 lines

So, I had to spend some time looking into the (gory) details of python-swig. Let's say that this package could be the poster-child of everything that we do not like much in buildroot:

- it is a host-python-package, but in fact under the hood it just calls cmake

Yeah, it's making use of the scikit-build for that from what I can tell.

Quoted 3 lines

- which means that host-cmake should be a dependency, as well as quite a few others: host-bison, host-pcre2...

I think we would ideally just want it to depend on host-swig.

Quoted 4 lines

- it *downloads* those dependencies at build time when missing. it even tries to download a pre-built bison binary! Hey, look, it even downloads swig itself! ;-)

Yep, it seems it invokes scikit-build which in turn invokes cmake to download a bunch of dependencies.

Quoted 6 lines

- it builds those dependencies

At which point I bailed out... All of the above could have been trivially found by running just this:

Quoted 8 lines
    $ make defconfig
    $ make host-swig-configure
    $ make host-swig-build

and looking at the output, which differs quite substantially from the usual python packages, and thus should have raised some eyebrows...

So, sorry, but this package really needs more investigations.

Yeah, I've opened an issue upstream to see about how we might go about just using our existing swig build with this package:
https://github.com/nightlark/swig-pypi/issues/114

Quoted 69 lines

Regards,
Yann E. MORIN.

Quoted 52 lines
Quoted 52 lines

[0] https://pypi.org/project/swig/
[1] https://swig.org/
[2] https://github.com/nightlark/swig-pypi
[3] https://github.com/swig/swig

Regards,
Yann E. MORIN.

Quoted 44 lines
---
 package/python-swig/python-swig.hash |  5 +++++
 package/python-swig/python-swig.mk   | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 package/python-swig/python-swig.hash
 create mode 100644 package/python-swig/python-swig.mk
package/python-swig/python-swig.hash new file +5 -0
new file mode 100644
index 0000000000..d60477f602
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/swig/json
+md5  c2bf820a545f333d47b7be513baaee3c  swig-4.1.1.post1.tar.gz
+sha256  5cbf2d4dfc413f74cac197704296a9ef065a3f81c7b3792ff11a56d312c4f652  swig-4.1.1.post1.tar.gz
+# Locally computed sha256 checksums
+sha256  73ba74dfaa520b49a401b5d21459a8523a146f3b7518a833eea5efa85130bf68  LICENSE
package/python-swig/python-swig.mk new file +17 -1
new file mode 100644
index 0000000000..89ede170c8
@@ -0,0 +1,17 @@
+################################################################################
+#
+# python-swig
+#
+################################################################################
+
+PYTHON_SWIG_VERSION = 4.1.1.post1
+PYTHON_SWIG_SOURCE = swig-$(PYTHON_SWIG_VERSION).tar.gz
+PYTHON_SWIG_SITE = https://files.pythonhosted.org/packages/da/b8/d1bfba3d7f75eeca60ecdcb2c214e5cdebb7477437d45db77b6dafee80f9
+PYTHON_SWIG_SETUP_TYPE = setuptools
+PYTHON_SWIG_LICENSE = Apache-2.0
+PYTHON_SWIG_LICENSE_FILES = LICENSE
+HOST_PYTHON_SWIG_DEPENDENCIES = \
+     host-python-scikit-build \
+     host-python-setuptools-scm
+
+$(eval $(host-python-package))
--

2.34.1

Quoted 12 lines
Quoted 5 lines
Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

Quoted 7 lines

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

Quoted 7 lines

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#9 lore raw

PATCH 5/6 ackage/python-libclang: new package

In reply to James Hilliard
---
 package/python-libclang/python-libclang.hash |  5 +++++
 package/python-libclang/python-libclang.mk   | 14 ++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 package/python-libclang/python-libclang.hash
 create mode 100644 package/python-libclang/python-libclang.mk
package/python-libclang/python-libclang.hash new file +5 -0
new file mode 100644
index 0000000000..521062dbf5
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/libclang/json
+md5  fffb0029127aa45bbdc46da944a97693  libclang-16.0.6.tar.gz
+sha256  4acdde39dfe410c877b4ccc0d4b57eb952100e4ee26bbdf6cfdb88e2033a7d31  libclang-16.0.6.tar.gz
+# Locally computed sha256 checksums
+sha256  ebcd9bbf783a73d05c53ba4d586b8d5813dcdf3bbec50265860ccc885e606f47  LICENSE.TXT
package/python-libclang/python-libclang.mk new file +14 -0
new file mode 100644
index 0000000000..8f68316c26
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-libclang
+#
+################################################################################
+
+PYTHON_LIBCLANG_VERSION = 16.0.6
+PYTHON_LIBCLANG_SOURCE = libclang-$(PYTHON_LIBCLANG_VERSION).tar.gz
+PYTHON_LIBCLANG_SITE = https://files.pythonhosted.org/packages/c2/01/ec65dffc8c94bd8cafd359a76992f3212a239a80ead05522995c105432b8
+PYTHON_LIBCLANG_SETUP_TYPE = setuptools
+PYTHON_LIBCLANG_LICENSE = Apache-2.0
+PYTHON_LIBCLANG_LICENSE_FILES = LICENSE.TXT
+
+$(eval $(host-python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#10 lore raw

PATCH 6/6 package/python-pymupdf: bump to version 1.23.9rc2

In reply to James Hilliard

Migrate to in tree pep517 based build backend.

Note that version 1.23.8 is not compatible with mupdf 1.23.8 due to header conflict bugs that were fixed after the 1.23.8 release.

---
 package/python-pymupdf/python-pymupdf.hash |  4 +--
 package/python-pymupdf/python-pymupdf.mk   | 33 ++++++++++++----------
 2 files changed, 20 insertions(+), 17 deletions(-)
package/python-pymupdf/python-pymupdf.hash +2 -2
index 9fd8150088..e57652ab69 100644
@@ -1,5 +1,5 @@
 # md5, sha256 from https://pypi.org/pypi/pymupdf/json
-md5  468fe56375a1fca99e83fe0aa0b9f8bd  PyMuPDF-1.22.0.tar.gz
-sha256  6e1694e5c0cd8b92d503a506ee8e4ba1bed768528de586889d3ec90e9dc4a7d3  PyMuPDF-1.22.0.tar.gz
+md5  eb0b65eaa063c2417d89c5453e7c82ad  PyMuPDF-1.23.9rc2.tar.gz
+sha256  ba6fdd907814acb968ce669f49b0c14ef9ef8b1e2d161829b7a31461aab04429  PyMuPDF-1.23.9rc2.tar.gz
 # Locally computed sha256 checksums
 sha256  57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6  COPYING
package/python-pymupdf/python-pymupdf.mk +18 -15
index 639ce0e00e..ac76afa3f6 100644
@@ -5,25 +5,28 @@
 ################################################################################
 
 # python-pymupdf's version must match mupdf's version
-PYTHON_PYMUPDF_VERSION = 1.22.0
+PYTHON_PYMUPDF_VERSION = 1.23.9rc2
 PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz
-PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/28/ba/d6bb6fd678e8396d7b944870286fb25fd6f499b8cb599b5436c8f725adbf
-PYTHON_PYMUPDF_SETUP_TYPE = setuptools
+PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/b4/ff/db44303d60b8cc310a7187d500c7765b3b48aa113c86428d5d1c390b8fb5
+PYTHON_PYMUPDF_SETUP_TYPE = pep517
 PYTHON_PYMUPDF_LICENSE = AGPL-3.0+
 PYTHON_PYMUPDF_LICENSE_FILES = COPYING
 # No license file included in pip, but it's present on github
-PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig mupdf zlib
+PYTHON_PYMUPDF_DEPENDENCIES = \
+	host-python-libclang \
+	host-python-psutil \
+	host-python-setuptools \
+	host-python-swig \
+	host-swig \
+	freetype \
+	mupdf \
+	zlib
 
-PYTHON_PYMUPDF_ENV = CFLAGS="-I$(STAGING_DIR)/usr/include/mupdf -I$(STAGING_DIR)/usr/include/freetype2"
-
-# We need to remove the original paths as we provide them in the CFLAGS:
-define PYTHON_PYMUPDF_REMOVE_PATHS
-	sed -i "/\/usr\/include\/mupdf/d" $(@D)/setup.py
-	sed -i "/\/usr\/include\/freetype2/d" $(@D)/setup.py
-	sed -i "/\/usr\/local\/include\/mupdf/d" $(@D)/setup.py
-	sed -i "/mupdf\/thirdparty\/freetype\/include/d" $(@D)/setup.py
-endef
-
-PYTHON_PYMUPDF_POST_PATCH_HOOKS = PYTHON_PYMUPDF_REMOVE_PATHS
+PYTHON_PYMUPDF_ENV = \
+	PYMUPDF_INCLUDES="$(STAGING_DIR)/usr/include/freetype2:$(STAGING_DIR)/usr/include" \
+	PYMUPDF_MUPDF_LIB="$(STAGING_DIR)/usr/lib" \
+	PYMUPDF_SETUP_FLAVOUR=p \
+	PYMUPDF_SETUP_IMPLEMENTATIONS=a \
+	PYMUPDF_SETUP_MUPDF_BUILD=
 
 $(eval $(python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#11 lore raw

Re: [Buildroot] [PATCH 6/6] package/python-pymupdf: bump to version 1.23.9rc2

Hi James, all,

Thanks for the patches!
I added a few comments/questions below.

Quoted 2 lines · James Hilliard

Migrate to in tree pep517 based build backend.

Does this new version cross-compile for you?
I get the following error because the wrong python-config is used (I only briefly tried armv5 so far):

error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."

Quoted 32 lines

Note that version 1.23.8 is not compatible with mupdf 1.23.8 due to header conflict bugs that were fixed after the 1.23.8 release.

---
  package/python-pymupdf/python-pymupdf.hash |  4 +--
  package/python-pymupdf/python-pymupdf.mk   | 33 ++++++++++++----------
  2 files changed, 20 insertions(+), 17 deletions(-)
package/python-pymupdf/python-pymupdf.hash +2 -2
index 9fd8150088..e57652ab69 100644
@@ -1,5 +1,5 @@
  # md5, sha256 from https://pypi.org/pypi/pymupdf/json
-md5  468fe56375a1fca99e83fe0aa0b9f8bd  PyMuPDF-1.22.0.tar.gz
-sha256  6e1694e5c0cd8b92d503a506ee8e4ba1bed768528de586889d3ec90e9dc4a7d3  PyMuPDF-1.22.0.tar.gz
+md5  eb0b65eaa063c2417d89c5453e7c82ad  PyMuPDF-1.23.9rc2.tar.gz
+sha256  ba6fdd907814acb968ce669f49b0c14ef9ef8b1e2d161829b7a31461aab04429  PyMuPDF-1.23.9rc2.tar.gz
  # Locally computed sha256 checksums
  sha256  57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6  COPYING
package/python-pymupdf/python-pymupdf.mk +1 -1
index 639ce0e00e..ac76afa3f6 100644
@@ -5,25 +5,28 @@
  ################################################################################
 
  # python-pymupdf's version must match mupdf's version
-PYTHON_PYMUPDF_VERSION = 1.22.0
+PYTHON_PYMUPDF_VERSION = 1.23.9rc2
  PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz

package/python-pymupdf/python-pymupdf.mk line 16

Quoted 10 lines
package/python-pymupdf/python-pymupdf.mk +4 -3
-PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/28/ba/d6bb6fd678e8396d7b944870286fb25fd6f499b8cb599b5436c8f725adbf
-PYTHON_PYMUPDF_SETUP_TYPE = setuptools
+PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/b4/ff/db44303d60b8cc310a7187d500c7765b3b48aa113c86428d5d1c390b8fb5
+PYTHON_PYMUPDF_SETUP_TYPE = pep517
  PYTHON_PYMUPDF_LICENSE = AGPL-3.0+
  PYTHON_PYMUPDF_LICENSE_FILES = COPYING
  # No license file included in pip, but it's present on github
-PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig mupdf zlib
+PYTHON_PYMUPDF_DEPENDENCIES = \
+	host-python-libclang \

Isn't libclang only required by the PyMuPDF plumbing when it builds the bundled MuPDF? In our case since we're building MuPDF as a separate package, we hopefully don't need it...

package/python-pymupdf/python-pymupdf.mk line 17

Quoted 1 line
package/python-pymupdf/python-pymupdf.mk +1 -0
+	host-python-psutil \

From a quick look at the PyMuPDF code, this seems to be needed only for a single test (which we don't run, so we don't need it).

package/python-pymupdf/python-pymupdf.mk line 19

Quoted 2 lines
package/python-pymupdf/python-pymupdf.mk +2 -0
+	host-python-setuptools \
+	host-python-swig \

The way I understand it, PyMuPDF added this host-python-swig dependency as a way to make sure swig is available when building. Since we already have host-swig as a dependency, we can probably use that one to build as Yann suggested?

Quoted 10 lines
package/python-pymupdf/python-pymupdf.mk +4 -5
+	host-swig \
+	freetype \
+	mupdf \
+	zlib
 
-PYTHON_PYMUPDF_ENV = CFLAGS="-I$(STAGING_DIR)/usr/include/mupdf -I$(STAGING_DIR)/usr/include/freetype2"
-
-# We need to remove the original paths as we provide them in the CFLAGS:
-define PYTHON_PYMUPDF_REMOVE_PATHS
-	sed -i "/\/usr\/include\/mupdf/d" $(@D)/setup.py

package/python-pymupdf/python-pymupdf.mk

Quoted 10 lines
package/python-pymupdf/python-pymupdf.mk +4 -6
-	sed -i "/\/usr\/include\/freetype2/d" $(@D)/setup.py
-	sed -i "/\/usr\/local\/include\/mupdf/d" $(@D)/setup.py
-	sed -i "/mupdf\/thirdparty\/freetype\/include/d" $(@D)/setup.py
-endef
-
-PYTHON_PYMUPDF_POST_PATCH_HOOKS = PYTHON_PYMUPDF_REMOVE_PATHS
+PYTHON_PYMUPDF_ENV = \
+	PYMUPDF_INCLUDES="$(STAGING_DIR)/usr/include/freetype2:$(STAGING_DIR)/usr/include" \
+	PYMUPDF_MUPDF_LIB="$(STAGING_DIR)/usr/lib" \
+	PYMUPDF_SETUP_FLAVOUR=p \> +	PYMUPDF_SETUP_IMPLEMENTATIONS=a \

It's worth noting that PyMuPDF is gradually switching to a new implementation which will require MuPDF to be built with python bindings in the future (but for now, both implementations are still available AFAICT).

package/python-pymupdf/python-pymupdf.mk line 32

Quoted 3 lines
package/python-pymupdf/python-pymupdf.mk +1 -0
+	PYMUPDF_SETUP_MUPDF_BUILD=
 
  $(eval $(python-package))

There seem to be more work needed to get this new version to work, I'll try to have a closer look at it in the next few days.

Kind regards,

Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#12 lore raw

Re: [Buildroot] [PATCH 6/6] package/python-pymupdf: bump to version 1.23.9rc2

Hi Raphaël,

Quoted 4 lines · Raphaël Mélotte via buildroot

Hi James, all,

Thanks for the patches!
I added a few comments/questions below.

Your comments actually sound pretty essential, and I think they affect the
earlier patches in the series as well. Should I mark the entire series as Changes Requested?

Also, will you work on fixing the issues or should James take it on?

Regards,
Arnout

Quoted 101 lines · James Hilliard
Quoted 2 lines

Migrate to in tree pep517 based build backend.

Does this new version cross-compile for you?
I get the following error because the wrong python-config is used (I only briefly tried armv5 so far):

error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."

Quoted 43 lines

Note that version 1.23.8 is not compatible with mupdf 1.23.8 due to header conflict bugs that were fixed after the 1.23.8 release.

---
  package/python-pymupdf/python-pymupdf.hash |  4 +-- package/python-pymupdf/python-pymupdf.mk   | 33 ++++++++++++----------

  2 files changed, 20 insertions(+), 17 deletions(-)
package/python-pymupdf/python-pymupdf.hash +0 -2
index 9fd8150088..e57652ab69 100644
@@ -1,5 +1,5 @@
   # md5, sha256 from https://pypi.org/pypi/pymupdf/json
-md5  468fe56375a1fca99e83fe0aa0b9f8bd  PyMuPDF-1.22.0.tar.gz
-sha256  6e1694e5c0cd8b92d503a506ee8e4ba1bed768528de586889d3ec90e9dc4a7d3  

PyMuPDF-1.22.0.tar.gz

package/python-pymupdf/python-pymupdf.hash +2 -0
+md5  eb0b65eaa063c2417d89c5453e7c82ad  PyMuPDF-1.23.9rc2.tar.gz
+sha256  ba6fdd907814acb968ce669f49b0c14ef9ef8b1e2d161829b7a31461aab04429  

PyMuPDF-1.23.9rc2.tar.gz
  # Locally computed sha256 checksums
  sha256  57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING

package/python-pymupdf/python-pymupdf.mk +1 -1
index 639ce0e00e..ac76afa3f6 100644
@@ -5,25 +5,28 @@
 
 ################################################################################
   # python-pymupdf's version must match mupdf's version
-PYTHON_PYMUPDF_VERSION = 1.22.0
+PYTHON_PYMUPDF_VERSION = 1.23.9rc2

  PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz -PYTHON_PYMUPDF_SITE =
https://files.pythonhosted.org/packages/28/ba/d6bb6fd678e8396d7b944870286fb25fd6f499b8cb599b5436c8f725adbf

package/python-pymupdf/python-pymupdf.mk +1 -1
-PYTHON_PYMUPDF_SETUP_TYPE = setuptools
+PYTHON_PYMUPDF_SITE = 

https://files.pythonhosted.org/packages/b4/ff/db44303d60b8cc310a7187d500c7765b3b48aa113c86428d5d1c390b8fb5
+PYTHON_PYMUPDF_SETUP_TYPE = pep517 PYTHON_PYMUPDF_LICENSE = AGPL-3.0+ PYTHON_PYMUPDF_LICENSE_FILES = COPYING
  # No license file included in pip, but it's present on github

package/python-pymupdf/python-pymupdf.mk line 16

Quoted 3 lines
package/python-pymupdf/python-pymupdf.mk +2 -1
-PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig mupdf zlib
+PYTHON_PYMUPDF_DEPENDENCIES = \
+    host-python-libclang \

Isn't libclang only required by the PyMuPDF plumbing when it builds the bundled MuPDF? In our case since we're building MuPDF as a separate package, we hopefully don't need it...

Quoted 1 line

+    host-python-psutil \

From a quick look at the PyMuPDF code, this seems to be needed only for a
single test (which we don't run, so we don't need it).

Quoted 2 lines

+    host-python-setuptools \
+    host-python-swig \

The way I understand it, PyMuPDF added this host-python-swig dependency as a way to make sure swig is available when building. Since we already have host-swig as a dependency, we can probably use that one to build as Yann suggested?

Quoted 18 lines

+    host-swig \
+    freetype \
+    mupdf \
+    zlib

package/python-pymupdf/python-pymupdf.mk +2 -12
-PYTHON_PYMUPDF_ENV = CFLAGS="-I$(STAGING_DIR)/usr/include/mupdf 
-I$(STAGING_DIR)/usr/include/freetype2"
-
-# We need to remove the original paths as we provide them in the CFLAGS:
-define PYTHON_PYMUPDF_REMOVE_PATHS
-    sed -i "/\/usr\/include\/mupdf/d" $(@D)/setup.py
-    sed -i "/\/usr\/include\/freetype2/d" $(@D)/setup.py
-    sed -i "/\/usr\/local\/include\/mupdf/d" $(@D)/setup.py
-    sed -i "/mupdf\/thirdparty\/freetype\/include/d" $(@D)/setup.py
-endef
-
-PYTHON_PYMUPDF_POST_PATCH_HOOKS = PYTHON_PYMUPDF_REMOVE_PATHS
+PYTHON_PYMUPDF_ENV = \
+    
Quoted 3 lines

PYMUPDF_INCLUDES="$(STAGING_DIR)/usr/include/freetype2:$(STAGING_DIR)/usr/include" \
+    PYMUPDF_MUPDF_LIB="$(STAGING_DIR)/usr/lib" \
+    PYMUPDF_SETUP_FLAVOUR=p \> +    PYMUPDF_SETUP_IMPLEMENTATIONS=a \

It's worth noting that PyMuPDF is gradually switching to a new implementation which will require MuPDF to be built with python bindings in the future (but for now, both implementations are still available AFAICT).

Quoted 2 lines

+    PYMUPDF_SETUP_MUPDF_BUILD=
  $(eval $(python-package))

There seem to be more work needed to get this new version to work, I'll try to have a closer look at it in the next few days.

Quoted 7 lines

Kind regards,

Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#13 lore raw

Re: [Buildroot] [PATCH 6/6] package/python-pymupdf: bump to version 1.23.9rc2

Hi Arnout,

Quoted 9 lines · Arnout Vandecappelle

 Hi Raphaël,

Quoted 4 lines · Raphaël Mélotte via buildroot

Hi James, all,

Thanks for the patches!
I added a few comments/questions below.

 Your comments actually sound pretty essential, and I think they affect the earlier patches in the series as well. Should I mark the entire series as Changes Requested?

The new python-pymupdf version from this series doesn't cross-compile, and updating mupdf alone would also break python-pymupdf (as their versions have to be kept in sync) so to me, yes.

Quoted 2 lines

 Also, will you work on fixing the issues or should James take it on?

I have some idea of what is causing the new build failure for python-pymupdf, I will take care of it (I should be able to do that within the next few days).

Kind regards,

Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot