We (Arch Linux) decided to stop relying on PyPI source tarballs for our python packages (when possible), you can read the rationales from the related RFC. We now advise our package maintainers to rely upon sources directly from the upstream projects instead. For instance, relying on GitHub’s auto-generated source tarball would be a good choice here regarding our guidelines.
There’s no need to cd to $srcdir in the different functions (prepare(), build(), check(), package()) as they are already executed from there.
The ln -sf dance in build() is pretty unusual and futile. You could simply cd "${_pkgname}-${pkgver}" directly in such case.
You defined python-pytest as a check dependency but the PKGBUILD doesn’t run tests. You should either introduce a check() function to run said tests or, alternatively, drop the checkdepends array to avoid installing unused dependencies during the building process.
There’s no need to install the Apache-2.0 license under /usr/share/licenses/${pkgname} as this license is already provided by our “generic” licenses package (which is part of every Arch installation). See this Wiki chapter for more details.
This is a minor detail, but your PKGBUILDs lack some “style” consistency (e.g. sometimes arrays are quoted, sometimes not; variables are sometimes quoted, sometimes not; variables are sometimes in the form of $var, sometimes in the form of ${var}). While we do not suggest one style over another, I personally prefer using the same one consistently over the whole PKGBUILD.
Here is my personal “refinement” suggestion for the ansible-creator PKGBUILD, according to the above points (same could be applied to ansible-navigator and ansible-dev-environment):
successfully tested / built in a clean chroot
# Maintainer: Alexander Jacocks <alexander@redhat.com>
pkgname=ansible-creator
pkgver=25.5.0
pkgrel=1
pkgdesc="A CLI tool for scaffolding all your Ansible Content."
arch=('any')
url="https://github.com/ansible/ansible-creator"
license=('Apache-2.0')
depends=('python' 'python-jsonschema' 'python-onigurumacffi' 'ansible-core' 'ansible-runner' 'podman')
makedepends=('python-build' 'python-installer' 'python-pip' 'python-setuptools' 'python-setuptools-scm' 'python-wheel')
optdepends=('ansible: check official ansible collections')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('f2cbd89021611463e26884ea179dd62c7a0e02c224e0fd21c38e8405be6f1506')
build() {
cd "${pkgname}-${pkgver}"
export SETUPTOOLS_SCM_PRETEND_VERSION="${pkgver}"
python -m build --wheel --no-isolation
}
package() {
cd "${pkgname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
}
Again, your PKGBUILDs look good overall and my suggestions are mostly about minor improvements.
I hope that helps!
Without a 0BSD license, this package is not eligible for promotion to the official repositories (or rather, not as-is). See the last bullet point in the related Arch wiki section and the related RFC for more details.
Just to make things clean, this 0BSD license is only about package sources / build scripts (namely, in that case, the PKGBUILD itself); it is not about the distributed ansible-navigator software.
I will handle the process for the move myself in a few, but here are the details:
I will create an ansible-navigator package in our official [extra] repository. The pkgrel of said package will be bumped (as compared to the AUR one) to ensure a smooth transition from the AUR package to the [extra] package for users
I will therefore become the package maintainer for the ansible-navigator package in our repository. Thanks to the 0BSD license you pushed, you will be listed as a (past) contributor for it (thanks )
I will then start a deletion process of the ansible-navigator AUR package, as it will then be considered a duplicate of the ansible-navigator package from our official repository. The ansible-navigator-git package you maintain in the AUR can remain however, no problem here