You are not logged in.

#1 2025-04-25 04:52:59

Nick77
Member
Registered: 2025-04-25
Posts: 1

I tried to package a simple python script, but a meet some issuses

https://aur.archlinux.org/cgit/aur.git/ … D?h=jakana
https://github.com/Catalina-sys456/jakana


pkgname=jakana
pkgver=0.1.0
pkgrel=1
pkgdesc='learn Japanese kana on cli'
arch=('any')
url='https://github.com/Catalina-sys456/jakana'
license=('MIT')
depends=('python')
makedepends=(python-build
         python-installer
         python-wheel
         python-hatchling)
source=(       
  $pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz)
sha512sums=('f7d893847b78189b4755b3b7604dee3bbadde273beb9ee946675315c40d5b2038c8a66fe42d2a81319568f100ecc84e46cb419926a02879c1af75ba4f5495661')

build() {
    cd "$srcdir/${pkgname}-${pkgver}"
    python -m build --wheel --no-isolation
}

package() {
    cd $pkgname-$pkgver
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE $pkgdir/usr/share/licenses/${pkgname%-*}/LICENSE
}


makepkg -si work fine,I also can install the package by sudo pacman -U,
but if i try to install it by paru, it report an error:

/home/ghost/.cache/paru/clone/jakana/PKGBUILD: line 17: cd: -0: invalid option
cd: usage: cd [-L|[-P [-e]] [-@]] [dir]
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'jakana-0.1.0-1':
error: packages failed to build: jakana-0.1.0-1

According to https://wiki.archlinux.org/title/Python … guidelines I change the two cd conmmand to "cd $_name-$pkgver",but it still doesn't work.

Last edited by Nick77 (2025-04-25 04:55:39)

Offline

#2 2025-04-26 10:57:50

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,831

Re: I tried to package a simple python script, but a meet some issuses

Please use code tags for PKGBUILD contents, program output and such.
(https://bbs.archlinux.org/help.php#bbcode )

You should add yourself as maintainer in a line at the top of the PKGBUILD  with your name and email address.
(look at https://aur.archlinux.org/cgit/aur.git/ … h=mesa-git  for an example)

The package builds fine in a clean chroot using pkgctl build (from devtools).

Try git cloning the aur repo for the package in a fresh folder, then retry building with paru .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB