Package Details: dymoprint 2.2.1-2

Git Clone URL: https://aur.archlinux.org/dymoprint.git (read-only, click to copy)
Package Base: dymoprint
Description: Linux Software to print with LabelManager PnP from Dymo
Upstream URL: https://github.com/computerlyrik/dymoprint
Licenses: Apache
Provides: dymoprint
Submitter: rarvolt
Maintainer: rarvolt
Last Packager: rarvolt
Votes: 0
Popularity: 0.000000
First Submitted: 2022-01-11 01:02 (UTC)
Last Updated: 2023-09-04 06:51 (UTC)

Latest Comments

cellisten commented on 2024-01-13 12:30 (UTC)

I've tested with removing the <0.4 on hatch-vcs in the local build and it works without issues. I also tried 2.4.0 instead of 2.2.1 and it seems to work (although I only got it working with sudo for now)

owenthewizard commented on 2024-01-12 23:50 (UTC)

ERROR Missing dependencies: hatch-vcs<0.4,>=0.3.0

Auerhuhn commented on 2023-07-27 10:17 (UTC)

@Nestor_013 That’s due to missing packages in makedepends, see the comment below yours. /cc @rarvolt

Nestor_013 commented on 2023-07-27 10:06 (UTC) (edited on 2023-07-27 10:06 (UTC) by Nestor_013)

Hi, I cannot build it. I got these error messages:

==> Starting prepare()...
patching file src/dymoprint/dymo_print_engines.py
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 265 with fuzz 1.
==> Starting build()...
/usr/sbin/python: No module named build
==> ERROR: A failure occurred in build().

Auerhuhn commented on 2023-07-17 09:02 (UTC)

Hi @rarvolt, thanks a lot for updating the version and incorporating the patch.

The current version of dymoprint requires a few additional dependencies:

  • Missing depends: python-pyqt6 (see dymoprint#54)

  • Changed depends: usb_modeswitch is no longer needed but python-pyusb is (see dymoprint#56)

  • I see you’ve afforded the build process a little facelift so it now uses the latest recommended tools, which is excellent. Due to that, your PKGBUILD now requires the following additional makedepends: python-build, python-installer, python-setuptools, python-setuptools-scm and python-wheel. Would you mind adding those?

(You can confirm all findings by running namcap on the finished package file.)

Thanks again!

Auerhuhn commented on 2023-07-09 13:54 (UTC)

My patch for Pillow 10 compatibility has been accepted upstream, and will be included in an upcoming release.

@rarvolt If you bump dymoprint to v2.0.0, you can ignore my 2023-07-05 comment, and directly apply the patch from PR #68 instead: https://github.com/computerlyrik/dymoprint/pull/68.patch

Auerhuhn commented on 2023-07-05 08:08 (UTC)

With the latest update of python-pillow to version 10.0.0, dymoprint bails with the following stacktrace:

Traceback (most recent call last):
  File "/usr/bin/dymoprint", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/dymoprint/command_line.py", line 171, in main
    labelwidth = max(font.getsize(line)[0] for line in labeltext) + (fontoffset * 2)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dymoprint/command_line.py", line 171, in <genexpr>
    labelwidth = max(font.getsize(line)[0] for line in labeltext) + (fontoffset * 2)
                     ^^^^^^^^^^^^
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

This is caused by one of the latest upstream releases removing a deprecated method.

The following patch works around this issue:

diff --git a/PKGBUILD b/PKGBUILD
index cfd83a2..732bde1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Marcin Kornat <rarvolt@gmail.com>
 pkgname=dymoprint
 pkgver=1.2.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Linux Software to print with LabelManager PnP from Dymo"
 arch=('any')
 license=('Apache')
@@ -15,16 +15,23 @@ depends=(
     'python-barcode'
     'usb_modeswitch'
     )
-makedepends=('python-pip')
+makedepends=('zip' 'unzip' 'python-pip')
 source=(
         "https://files.pythonhosted.org/packages/e6/04/0df45c240e2568bd2ad77eabe167650615e8a8cf36d5155fb6bc1eb38402/${pkgname}-${pkgver}-py2.py3-none-any.whl"
         "91-dymo-labelmanager-pnp.rules"
         "dymo-labelmanager-pnp.conf"
     )
 noextract=("${pkgname}-${pkgver}-py2.py3-none-any.whl")
-sha256sums=('1e4885fa4a82ad7d7af41beec90f68bd5cb28a1c7400309fbcf81c23ebd127fb'
+sha256sums=('SKIP'
             'edbbce0aac6fceb778fef854170144842fc444326bf9c1b86c314d6dbfe6b2e8'
             '73aa314b713171892672bf9f68468bec137b37c5a7a07513b6b25573bec4e99d')
+prepare() {
+    cd "$(mktemp -d)"
+    unzip "${srcdir}/${pkgname}-${pkgver}-py2.py3-none-any.whl"
+    sed -i -e 's/max(.* \(for line in labeltext\)/max(r - l for l, _, r, _ in (font.getbbox(line) \1)/' dymoprint/command_line.py
+    sed -i -e 's/ANTIALIAS/LANCZOS/g' dymoprint/command_line.py
+    zip -ur "${srcdir}/${pkgname}-${pkgver}-py2.py3-none-any.patched.whl" *
+}

 package() {
     install -Dm644 91-dymo-labelmanager-pnp.rules "${pkgdir}/etc/udev/rules.d/91-dymo-labelmanager-pnp.rules"
@@ -37,5 +44,5 @@ package() {
         --root="${pkgdir}" \
         --ignore-installed \
         --no-deps \
-        *.whl
+        "${pkgname}-${pkgver}-py2.py3-none-any.patched.whl"
 }

Note that this patch is just a quick workaround.
I’d rather recommend that the PKGBUILD be rewritten to use the source from GitHub, then build the wheel from the patched source.

spease commented on 2023-06-17 19:19 (UTC)

Been getting more out of date, is this still maintained?