PKGBUILD review python application wtfis
Hi, Could someone review https://aur.archlinux.org/packages/wtfis This is my first time packaging a python tool from PyPI My understanding since it's not a library python-wtfis would be an incorrect naming convention. I used a tool to generate the first PKGBUILD then added dependencies. I assume lots of other things are missing to make this meet proper AUR standards. Thanks in advance,
On 5/18/25 1:41 PM, aur@nullvoid.me wrote:
Hi,
Could someone review https://aur.archlinux.org/packages/wtfis This is my first time packaging a python tool from PyPI My understanding since it's not a library python-wtfis would be an incorrect naming convention.
I used a tool to generate the first PKGBUILD then added dependencies. I assume lots of other things are missing to make this meet proper AUR standards.
Thanks in advance,
https://wiki.archlinux.org/title/Python_package_guidelines#Source Beyond that, the license can't be "None". If you don't have a license to use the software, you can't use it. The 'arch' doesn't seem to be correct. This appears to be pure python, no compiled binaries. The whole '|| exit' thing hasn't been necessary in PKGBUILDs for many years now. You're correct on the naming, this is a tool, so no python- prefix. What's the point of '_origpkgname'? 'python -m build' should generally be done in the build function. Can't say much about the deps/makedeps, but having both python-setuptools and python-hatchling seems strange. Are you sure both are required?
El dom, 18-05-2025 a las 14:18 -0500, Doug Newgard escribió:
Can't say much about the deps/makedeps, but having both python-setuptools and python-hatchling seems strange. Are you sure both are required?
I have checked it calmly and no, it don't need them. The fixed PKGBUILD would look like this: pkgname=wtfis pkgver=0.11.0 pkgrel=3 pkgdesc="Passive hostname, domain and IP lookup tool for non-robots" arch=("any") url='https://pypi.org/project/wtfis/' license=('GPL-3.0-or-later') depends=('python-dotenv' 'python-requests' 'python-rich' 'python- pydantic' 'python-shodan') makedepends=('python-build' 'python-hatchling' 'python-installer') source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz ") b2sums=('16f4572a8d381549877d3c8b7c464fcd1628f26bbc5169e1845e918019e9f7 699833d3f293cd9dd10fd56c774b957fdb89a49dff1aa9f01e4792e7669bcf6963') build() { cd ${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" } Changes: - The line with _origpkgname is unnecessary and you can remove it. - The architecture is any since no hardware dependent binary is generated. - The license is MIT. - The makedepends dependencies are fixed. - The source line is with variables so that when you change the pkgver the source changes and you don't have to change the line. - B2SUM is more efficient. - Although you can do everything in package() it is more elegant to separate the build() from the package(). And with those changes you would already have a “10” package. Greetings. -- Óscar García Amor | ogarcia at moire.org | http://ogarcia.me
participants (3)
-
aur@nullvoid.me
-
Doug Newgard
-
Óscar García Amor