Package Details: namcap-git 3.4.2.r14.g58592b0-1

Git Clone URL: https://aur.archlinux.org/namcap-git.git (read-only, click to copy)
Package Base: namcap-git
Description: A Pacman package analyzer
Upstream URL: https://gitlab.archlinux.org/pacman/namcap
Keywords: best-practices linter packaging pacman utility
Licenses: GPL-2.0-or-later
Conflicts: namcap
Provides: namcap
Submitter: None
Maintainer: PanisSupraOmnia
Last Packager: PanisSupraOmnia
Votes: 16
Popularity: 0.000128
First Submitted: 2007-07-25 02:57 (UTC)
Last Updated: 2023-12-26 18:55 (UTC)

Latest Comments

1 2 3 4 5 Next › Last »

gromit commented on 2024-01-28 21:23 (UTC) (edited on 2024-01-28 21:28 (UTC) by gromit)

This package currently fails most of the check() function, would be awesome if you could fix that!

Edit: Nevermind, that one was on me 😂

PanisSupraOmnia commented on 2023-03-13 00:33 (UTC) (edited on 2023-03-13 00:34 (UTC) by PanisSupraOmnia)

Hi, that rationale for the provides change sounds good to me. I'm trying to add that, the new dep, and the change to the testing command. Currently though, one of the tests is failing; unless this is expected on the current latest commit (57d146389d254486e2118772354fa8aa2a239645), I want to try to see if it's reproducible or something in my env. Either way it'll be up later this evening.

alerque commented on 2023-03-11 11:10 (UTC)

Here's the patch I'm currently using for testing namcap development (again can be applied with git am < file.patch):

From 78987f6ab4681dd717c0f2a20006b635b48a8d52 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Sat, 11 Mar 2023 12:12:34 +0300
Subject: [PATCH] Add new upstream dependency, provide version, tweak style

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 .SRCINFO | 5 +++--
 PKGBUILD | 9 ++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 37b70f6..8fa1db1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
 pkgbase = namcap-git
    pkgdesc = A Pacman package analyzer
-   pkgver = 3.3.1.r43.gb6265a7
+   pkgver = 3.4.0.r28.g57d1463
    pkgrel = 1
    url = https://gitlab.archlinux.org/pacman/namcap
    arch = any
@@ -16,10 +16,11 @@ pkgbase = namcap-git
    depends = binutils
    depends = elfutils
    depends = licenses
+   depends = pkgconfig
    depends = python
    depends = pyalpm
    depends = python-pyelftools
-   provides = namcap
+   provides = namcap=3.4.0.r28.g57d1463
    conflicts = namcap
    source = git+https://gitlab.archlinux.org/pacman/namcap.git
    sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 436ab6d..782e369 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@
 # Contributor: Jesse Young <jesse.young@gmail.com>

 pkgname=namcap-git
-pkgver=3.3.1.r43.gb6265a7
+pkgver=3.4.0.r28.g57d1463
 pkgrel=1
 pkgdesc="A Pacman package analyzer"
 arch=('any')
@@ -17,6 +17,7 @@ license=('GPL')
 depends=(binutils
          elfutils
          licenses
+         pkgconfig
          python
          pyalpm
          python-pyelftools)
@@ -26,7 +27,7 @@ makedepends=(git
 checkdepends=(python-pytest
               python-six
               systemd)
-provides=("${pkgname%-git}")
+provides=("${pkgname%-git}=$pkgver")
 conflicts=("${pkgname%-git}")
 source=("git+$url.git")
 sha256sums=('SKIP')
@@ -43,9 +44,7 @@ build() {

 check() {
   cd "${pkgname%-git}"
-  env PARSE_PKGBUILD_PATH="$srcdir/${pkgname%-git}" \
-      PATH="$srcdir/${pkgname%-git}/scripts:$PATH" \
-      pytest
+  env PARSE_PKGBUILD_PATH="$PWD" PATH="$PWD/scripts:$PATH" pytest
 }

 package() {
-- 
2.39.2

alerque commented on 2023-03-09 11:01 (UTC)

Please add depends+=(pkgconfig), a new dependency in recent development upstream.

alerque commented on 2023-03-09 10:10 (UTC)

Thanks for getting this updated finally.

The rational for the provides=("${pkgname%-git}=$pkgver") is that it enables other packages to specify a minimum version for dependency checking, e.g.g depends=("pkgname>=X.Y.Z"). Othewise VCS packages installed on people's machines are not considered candidates to provide since the $pkgver from the VCS package is not considered. Even though they may be new enough or even newer than stable packages they don't quality if they don't explicitly set their version.

It is probably not important here since I don't know of any packages that depends=(namcap>=X.Y.Z), it is just a standard thing I always to on VCS packages because it gives other packages more flexibility if they need it.

PanisSupraOmnia commented on 2023-03-06 08:09 (UTC)

Alright, took a bit longer than expected to get setup but I've got it updated, and tested that it works on my machine. I didn't take all the style changes as I'm personally not a fan of $_pkgname, and I didn't see any reason to change around the order of the variables from the standard, among other things.

I was wondering what the reason for the change to provides was for? If there's some best practice there that I'm unaware of I can change it, but wanted to understand why first. Otherwise, if there's anything I missed from your patch/any style changes you want to make an argument for, I should be much more responsive than previously!

PanisSupraOmnia commented on 2023-03-04 03:16 (UTC)

Hi @alerque! Huge apologies for the lack of response or update. I had to reformat my machine w/ Arch on it and then had some real-life issues keep me from getting to it. I did see your comment though and have been meaning to review it, and will finally have time to do so this weekend; I should be done by the end of the day tomorrow (in the US).

alerque commented on 2023-03-03 09:56 (UTC)

Updated patch with some target directory fixes added in.

Again apply with git am file.patch

From 6a01faaa8b6efbfd8914a5500355e3ae4a40f8ad Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Tue, 14 Feb 2023 14:05:00 +0300
Subject: [PATCH] Overhaul python build and dependencies

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 .SRCINFO | 18 ++++++++++------
 PKGBUILD | 65 ++++++++++++++++++++++++++++++++------------------------
 2 files changed, 49 insertions(+), 34 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 5b5805a..5cc9f79 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,27 @@
 pkgbase = namcap-git
    pkgdesc = A Pacman package analyzer
-   pkgver = 3.3.0.r0.gad8f115
+   pkgver = 3.3.1.r43.gb6265a7
    pkgrel = 1
    url = https://gitlab.archlinux.org/pacman/namcap
    arch = any
    license = GPL
-   checkdepends = systemd
+   checkdepends = python-pytest
    checkdepends = python-six
+   checkdepends = systemd
    makedepends = git
+   makedepends = python-build
+   makedepends = python-installer
+   makedepends = python-wheel
    makedepends = python-setuptools
-   depends = pyalpm
-   depends = licenses
    depends = binutils
+   depends = elfutils
+   depends = licenses
+   depends = pyalpm
+   depends = python
    depends = python-pyelftools
-   provides = namcap
+   provides = namcap=3.3.1.r43.gb6265a7
    conflicts = namcap
-   source = namcap-git::git+https://gitlab.archlinux.org/pacman/namcap.git
+   source = git+https://gitlab.archlinux.org/pacman/namcap.git
    sha256sums = SKIP

 pkgname = namcap-git
diff --git a/PKGBUILD b/PKGBUILD
index b278deb..223581f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,49 +1,58 @@
-#!/hint/bash -e
 # Maintainer: Adrien Smith <adrien@panissupraomnia.dev>
+# Contributor: Caleb Maclennan <caleb@alerque.com>
+# Contributor: Rémy Oudompheng <remy@archlinux.org>
+# Contributor: Hugo Doria <hugo@archlinux.org>
 # Contributor: Kyle Keen <keenerd@gmail.com>
 # Contributor: sudokode <sudokode@gmail.com>
 # Contributor: Jason Chu <jason@archlinux.org>
 # Contributor: Jesse Young <jesse.young@gmail.com>

 pkgname=namcap-git
-pkgver=3.3.0.r0.gad8f115
+_pkgname="${pkgname%-git}"
+pkgver=3.3.1.r43.gb6265a7
 pkgrel=1
-pkgdesc="A Pacman package analyzer"
-arch=('any')
-url="https://gitlab.archlinux.org/pacman/namcap"
-license=('GPL')
-depends=('pyalpm' 'licenses' 'binutils' 'python-pyelftools')
-makedepends=('git' 'python-setuptools')
-checkdepends=('systemd' 'python-six')
-provides=("${pkgname%-git}")
-conflicts=("${pkgname%-git}")
-source=("$pkgname::git+$url.git")
+pkgdesc='A Pacman package analyzer'
+arch=(any)
+url="https://gitlab.archlinux.org/pacman/$_pkgname"
+license=(GPL)
+depends=(binutils
+         elfutils
+         licenses
+         pyalpm
+         python
+         python-pyelftools)
+checkdepends=(python-pytest
+              python-six
+              systemd)
+makedepends=(git
+             python-{build,installer,wheel}
+             python-setuptools)
+conflicts=($_pkgname)
+provides=("$_pkgname=$pkgver")
+source=("git+$url.git")
 sha256sums=('SKIP')

 pkgver() {
-  cd $pkgname
-
-  git describe --long | sed 's/-/.r/;s/-/./'
+   cd "$_pkgname"
+   git describe --long --tags --abbrev=7 --always HEAD |
+       sed 's/\([^-]*-g\)/r\1/;s/-/./g'
 }

 build() {
-  cd $pkgname
-
-  python setup.py build
+   cd "$_pkgname"
+   python -m build -wn
 }

 check() {
-  cd $pkgname
-
-  env PARSE_PKGBUILD_PATH="$srcdir/${pkgname}" \
-      PATH="$srcdir/${pkgname}/scripts:$PATH" \
-      python setup.py test
+   cd "$_pkgname"
+   env PARSE_PKGBUILD_PATH="$srcdir/$_pkgname" \
+       PATH="$srcdir/$_pkgname/scripts:$PATH" \
+       pytest
 }

 package() {
-  cd $pkgname
-
-  python setup.py install --root="$pkgdir"
+   cd "$_pkgname"
+   python -m installer -d "$pkgdir" dist/*.whl
+   local site_packages="$(python -c "import site; print(site.getsitepackages()[0])")"
+   mv "$pkgdir/"{"$site_packages/usr/share",usr}
 }
-
-# vim:set ts=2 sw=2 et:
-- 
2.39.2

alerque commented on 2023-02-14 11:05 (UTC)

Upstream namcap maintainer here. For some reason I biffed the search for this package so I worked one up myself only to discover that it was actually here. Here is a patch with changes from the [community] build as well as an overhaul of my own. There is some style stuff here too and you can take or leave the style, but please at least fix:

  • missing depends, makedepends, and checkdepends
  • use PEP 517 python build and install tooling
  • provide with version information

This patch can be applied with git am file.patch:

From c873ae145be2129df88d2055cd41b2433d599d3a Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Tue, 14 Feb 2023 14:05:00 +0300
Subject: [PATCH] Overhaul python build and dependencies

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 .SRCINFO | 18 ++++++++++------
 PKGBUILD | 63 +++++++++++++++++++++++++++++++-------------------------
 2 files changed, 47 insertions(+), 34 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 5b5805a..c0c869a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,27 @@
 pkgbase = namcap-git
    pkgdesc = A Pacman package analyzer
-   pkgver = 3.3.0.r0.gad8f115
+   pkgver = 3.3.1.r33.g4859c66
    pkgrel = 1
    url = https://gitlab.archlinux.org/pacman/namcap
    arch = any
    license = GPL
-   checkdepends = systemd
+   checkdepends = python-pytest
    checkdepends = python-six
+   checkdepends = systemd
    makedepends = git
+   makedepends = python-build
+   makedepends = python-installer
+   makedepends = python-wheel
    makedepends = python-setuptools
-   depends = pyalpm
-   depends = licenses
    depends = binutils
+   depends = elfutils
+   depends = licenses
+   depends = pyalpm
+   depends = python
    depends = python-pyelftools
-   provides = namcap
+   provides = namcap=3.3.1.r33.g4859c66
    conflicts = namcap
-   source = namcap-git::git+https://gitlab.archlinux.org/pacman/namcap.git
+   source = git+https://gitlab.archlinux.org/pacman/namcap.git
    sha256sums = SKIP

 pkgname = namcap-git
diff --git a/PKGBUILD b/PKGBUILD
index b278deb..4c48c2c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,49 +1,56 @@
-#!/hint/bash -e
 # Maintainer: Adrien Smith <adrien@panissupraomnia.dev>
+# Contributor: Caleb Maclennan <caleb@alerque.com>
+# Contributor: Rémy Oudompheng <remy@archlinux.org>
+# Contributor: Hugo Doria <hugo@archlinux.org>
 # Contributor: Kyle Keen <keenerd@gmail.com>
 # Contributor: sudokode <sudokode@gmail.com>
 # Contributor: Jason Chu <jason@archlinux.org>
 # Contributor: Jesse Young <jesse.young@gmail.com>

 pkgname=namcap-git
-pkgver=3.3.0.r0.gad8f115
+_pkgname="${pkgname%-git}"
+pkgver=3.3.1.r33.g4859c66
 pkgrel=1
-pkgdesc="A Pacman package analyzer"
-arch=('any')
-url="https://gitlab.archlinux.org/pacman/namcap"
-license=('GPL')
-depends=('pyalpm' 'licenses' 'binutils' 'python-pyelftools')
-makedepends=('git' 'python-setuptools')
-checkdepends=('systemd' 'python-six')
-provides=("${pkgname%-git}")
-conflicts=("${pkgname%-git}")
-source=("$pkgname::git+$url.git")
+pkgdesc='A Pacman package analyzer'
+arch=(any)
+url="https://gitlab.archlinux.org/pacman/$_pkgname"
+license=(GPL)
+depends=(binutils
+         elfutils
+         licenses
+         pyalpm
+         python
+         python-pyelftools)
+checkdepends=(python-pytest
+              python-six
+              systemd)
+makedepends=(git
+             python-{build,installer,wheel}
+             python-setuptools)
+conflicts=($_pkgname)
+provides=("$_pkgname=$pkgver")
+source=("git+$url.git")
 sha256sums=('SKIP')

 pkgver() {
-  cd $pkgname
-
-  git describe --long | sed 's/-/.r/;s/-/./'
+   cd "$_pkgname"
+   git describe --long --tags --abbrev=7 --always HEAD |
+       sed 's/\([^-]*-g\)/r\1/;s/-/./g'
 }

 build() {
-  cd $pkgname
-
-  python setup.py build
+   cd "$_pkgname"
+   python -m build -wn
 }

 check() {
-  cd $pkgname
-
-  env PARSE_PKGBUILD_PATH="$srcdir/${pkgname}" \
-      PATH="$srcdir/${pkgname}/scripts:$PATH" \
-      python setup.py test
+   cd "$_pkgname"
+   env PARSE_PKGBUILD_PATH="$srcdir/$_pkgname" \
+       PATH="$srcdir/$_pkgname/scripts:$PATH" \
+       pytest
 }

 package() {
-  cd $pkgname
-
-  python setup.py install --root="$pkgdir"
+   cd "$_pkgname"
+   python -m installer -d "$pkgdir" dist/*.whl
 }
-
-# vim:set ts=2 sw=2 et:
-- 
2.39.1

yan12125 commented on 2022-05-30 08:01 (UTC)

No problem, thanks for the update! I'm looking forward to updated extra/namcap as well :)