@PainSan67 Would you mind fixing this as @mags has suggested in their comment?
The package is completely unusable as is.
Update: I adopted and overhauled cropgui-git. Feel free to reuse it for this PKGBUILD if you want.
![]() |
VOOZH | about |
| Git Clone URL: | https://aur.archlinux.org/cropgui.git (read-only, click to copy) |
|---|---|
| Package Base: | cropgui |
| Description: | a simple tool for lossless jpeg cropping |
| Upstream URL: | https://github.com/jepler/cropgui |
| Licenses: | GPL |
| Submitter: | jose1711 |
| Maintainer: | PainSan67 |
| Last Packager: | PainSan67 |
| Votes: | 16 |
| Popularity: | 0.000015 |
| First Submitted: | 2010-05-15 21:14 (UTC) |
| Last Updated: | 2024-11-01 11:04 (UTC) |
@PainSan67 Would you mind fixing this as @mags has suggested in their comment?
The package is completely unusable as is.
Update: I adopted and overhauled cropgui-git. Feel free to reuse it for this PKGBUILD if you want.
This package is completely broken as is.
Not only does upstream not follow python packaging standards, but the install.sh is a mess that doesn't install anything in right place.
This PKGBUILD will work as a workaround for the time being: https://gist.github.com/arcmags/d3d2bc65e42a76b3c0398ee8c3ce763e
...but, I would not personally recommend installing this as a system-wide package until it is properly packaged upstream.
The current PKGBUILD gives a 'dist tool' error since that package no longer exists in Python 3.12. The package also installs files in '/' and generates the "No module named 'cropgui_common" error.
As mentioned by mags, I think you need to add:
makedepends=('python-setuptools')
That worked for me.
pkgrel should be bumped to rebuild against python 3.12 (like python packages in the official repos do). Also, python-setuptools is now a make dependency as distutils was removed from python 3.12.
Hello @jose1711 and thanks for maintaining the package! Currently, there is an issue described in the commit message below. The patch below resolves that. Could you please apply the commit? Thanks!
From 977bd569accc3edff6bb9acc08a4483336a3b5a6 Mon Sep 17 00:00:00 2001
From: Daniil Kovalev <daniil@kovalev.website>
Date: Thu, 30 Nov 2023 19:18:21 +0300
Subject: [PATCH] Fix packaging when `which python` is `/sbin`
On many systems, `/sbin` is a symbolic link to `/usr/bin`. When passing
`-p /usr` before `-P /usr/bin/python`, we set `BINDIR` env variable to
`/sbin` and then do not override it with `/usr/bin`. So, the package
archive contains `/sbin/cropgui` instead of `/usr/bin/cropgui`. It results in
the following issues during package installation:
error: failed to commit transaction (conflicting files)
cropgui: /sbin exists in filesystem (owned by filesystem)
Changing `-p` and `-P` options order resolves the issue.
---
PKGBUILD | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PKGBUILD b/PKGBUILD
index b4235ad..4c6597e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,6 +2,7 @@
# Contributor: eniac
# Contributor: sabitmaulanaa
# Contributor: tdehaeze
+# Contributor: Daniil Kovalev
pkgname=cropgui
arch=('any')
@@ -17,5 +18,5 @@ md5sums=('af229e7a38afbbb0a560ed9492bf978f')
package() {
cd $srcdir/$pkgname-$pkgver
- ./install.sh -f gtk -t $pkgdir -p /usr -P /usr/bin/python
+ ./install.sh -f gtk -t $pkgdir -P /usr/bin/python -p /usr
}
--
2.43.0
@jose1711: thank you for the package-update. It works well! :-)
thank you all for your suggestions, please see the updated PKGBUILD and feel free to review & comment.
@gabor_zoka: I wonder why the last tag of cropgui is from 2021. With a new tag, there is a new chance to have this AUR püackage updated - and other problems resolved also here. Regarding AUR rules, flagging as out-of-date is not to be used if a package is broken (which this one is). So maybe triggering the cropgui project to add a new tag would make it easier to get updates here.
The program does not work, when using this package:
Traceback (most recent call last):
File "/usr/bin/cropgui", line 18, in <module>
from cropgui_common import *
ModuleNotFoundError: No module named 'cropgui_common'
Hi Jose1711,
A very nice pull request has been merged. Would it be possible to update the package to take into account this merge request (https://github.com/jepler/cropgui/pull/104).
Thanks!