MarkHedleyJones / dmenu-extended

An extension to dmenu for quickly opening files and folders.
MIT License
387 stars 33 forks source link

BUG: dmenu-extended-git-r358.16bde81-2 won't build from the AUR #143

Closed amtoine closed 1 year ago

amtoine commented 1 year ago

Hello there :wave: :yum:

i'm not sure the PKGBUILD of the application on the AUR is maintained from here, but we'll see :wink:

The bug

i tried to update dmenu-extended from last version with paru -S dmenu-extended on ArchLinux and i get the following error:

==> Starting build()...
python: can't open file '/home/ants/.cache/paru/clone/dmenu-extended-git/src/dmenu-extended/setup.py': [Errno 2] No such file or directory
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'dmenu-extended-git-r358.16bde81-2':
error: packages failed to build: dmenu-extended-git-r358.16bde81-2

A possible fix?

the previous PKGBUILD contains

build() {
  cd "$_pkgname"
  python setup.py build
}

package() {
  cd "$_pkgname"
  python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

but the setup.py script does not exist anymore.

i'm not sure where it got replaced by setup.sh nor how to rewrite the PKGBUILD exactly but i think that might be the key :smirk:

anyways, cheers :wave: :yum:

amtoine commented 1 year ago

well in fact, after some investigation

setup.py has been removed with

commit 20b2dd31fef54bc90af8d9e3f32a86cec1f509e8 (refs/bisect/bad)
Author: Mark Hedley Jones <MarkHedleyJones@gmail.com>
Date:   Mon Jul 25 01:35:04 2022 +0900

    Move to pyproject.toml based build

 pyproject.toml             | 26 +++++++++++++++++++++++++-
 setup.py                   | 33 ---------------------------------
 src/dmenu_extended/main.py |  2 +-
 3 files changed, 26 insertions(+), 35 deletions(-)

and setup.sh has been added with

commit 34112789213100091063339dfc73402258d52aab
Author: Mark H. Jones <markjones112358@gmail.com>
Date:   Sun Dec 8 09:11:47 2013 +1300

    Added automatic installer

 setup.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

hope that can help :yum:

MarkHedleyJones commented 1 year ago

Hi @amtoine, Thanks for the report, you're right that the setup.sh script was removed. Also, the versioning system moved to semantic versioning so there's going to need to be some changes make to that PKGBUILD. I just checked the AUR and it looks like the issue may have been fixed already there. Let me know if you still have issues.

amtoine commented 1 year ago

@MarkHedleyJones

Thanks for the report, you're right that the setup.sh script was removed

my pleasure :yum:

Also, the versioning system moved to semantic versioning so there's going to need to be some changes make to that PKGBUILD. I just checked the AUR and it looks like the issue may have been fixed already there. Let me know if you still have issues.

yep i've just seen the new PKGBUILD when running paru -S dmenu-extended :+1:

but i still get another issue :thinking:

ERROR Source /home/ants/.cache/paru/clone/dmenu-extended-git/src/dmenu-extended does not appear to be a Python project: no pyproject.toml or setup.py
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'dmenu-extended-git-r418.3639b0e-1'
amtoine commented 1 year ago

it should be pulling https://github.com/markjones112358/dmenu-extended.git which redirects to https://github.com/MarkHedleyJones/dmenu-extended, where pyproject.toml exists :thinking:

MarkHedleyJones commented 1 year ago

That's a shame. I just tried creating an account on AUR, but I don't have access to an arch machine to enter the captua code (which requires pacman). But I did notice this comment there:

If you are running into problems since the latest python 3.9 update, please remove the current package from your package cache and reinstall it - some paths need to be rewritten in the package.

I don't think it's specific to the issue you're having, but maybe worth a try...

My take on looking at the error you posted is that it's looking in the wrong path for pyproject.toml. pyproject.toml would be in ~/.cache/paru/clone/dmenu-extended-git, not inside the src/dmenu-extended subdirectory. But that's wierd because the old setup.py wouldn't have been in there either... :thinking:

Have you tried removing the /home/ants/.cache/paru/clone/dmenu-extended-git completely?

amtoine commented 1 year ago

Have you tried removing the /home/ants/.cache/paru/clone/dmenu-extended-git completely?

that was a great call :open_mouth: fixed the issue :muscle:

the key takeaway is to not be affraid to clean the cache :star_struck:

MarkHedleyJones commented 1 year ago

Fantastic, I'm glad that helped. I love your key takeaway reflection :smile: