Package Details: kicost-git 1.1.6.r1.227f246-1

Git Clone URL: https://aur.archlinux.org/kicost-git.git (read-only, click to copy)
Package Base: kicost-git
Description: Build cost spreadsheet for a KiCad project
Upstream URL: https://github.com/hildogjr/KiCost
Licenses: MIT
Conflicts: kicost
Provides: kicost
Submitter: rhssk
Maintainer: rhssk
Last Packager: rhssk
Votes: 0
Popularity: 0.000000
First Submitted: 2018-04-19 13:43 (UTC)
Last Updated: 2021-12-20 08:56 (UTC)

Latest Comments

dreieck commented on 2023-08-03 12:08 (UTC)

A quick fix to fix the generic files in /usr/lib/python3.11/site-packages/tests/ issue (↗ patch to PKGBUILD:

--- PKGBUILD.orig   2023-08-03 14:06:04.397179004 +0200
+++ PKGBUILD    2023-08-03 14:05:09.260508548 +0200
@@ -2,5 +2,5 @@
 pkgname=kicost-git
 _remotename=KiCost
-pkgver=1.1.6.r1.227f246
+pkgver=1.1.18.r1.197a61d
 pkgrel=1
 pkgdesc="Build cost spreadsheet for a KiCad project"
@@ -19,5 +19,7 @@
 makedepends=(
     git
-    python-setuptools
+    python-build
+    python-installer
+    python-wheel
 )
 provides=("${pkgname%-git}")
@@ -34,4 +36,10 @@
 }

+build() {
+    cd "$_remotename"
+
+    python -m build --wheel --no-isolation
+}
+
 check() {
     cd "$_remotename"
@@ -43,4 +51,8 @@
     cd "$_remotename"

-    python setup.py install --root="$pkgdir" --optimize=1
+    _pythonversion="$(python --version | awk '{print $2}' | awk -F. '{print $1"."$2}')"
+    python -m installer --destdir="$pkgdir" --compile-bytecode=2 dist/*.whl
+    rm -Rfv "${pkgdir}/usr/lib/python${_pythonversion}/site-packages/tests"/{__pycache__/{__init__.cpython-*.pyc,dummy-web-server.cpython-*.pyc},__init__.py,dummy-web-server.py}
+
+    install -Dvm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }

It might be possible to do it better.

Please review and apply.

Thanks for maintaining!

dreieck commented on 2023-08-03 11:57 (UTC)

Errors reported by namcap:

kicost-git E: Missing custom license directory (usr/share/licenses/kicost-git)
kicost-git W: Referenced python module 'urlparse.urlsplit' is an uninstalled dependency (needed in files ['usr/lib/python3.11/site-packages/kicost/distributors/dist_local_template.py'])
kicost-git W: Referenced python module 'urllib2.Request' is an uninstalled dependency (needed in files ['usr/lib/python3.11/site-packages/kicost/distributors/api_tme.py'])
kicost-git W: Referenced python module 'AppKit.NSSearchPathForDirectoriesInDomains' is an uninstalled dependency (needed in files ['usr/lib/python3.11/site-packages/kicost/kicad_config.py'])
kicost-git W: Referenced python module 'urllib2.URLError' is an uninstalled dependency (needed in files ['usr/lib/python3.11/site-packages/kicost/currency_converter/download_rates.py', 'usr/lib/python3.11/site-packages/kicost/distributors/api_tme.py'])
kicost-git W: Referenced python module 'sexpdata' is an uninstalled dependency (needed in files ['usr/lib/python3.11/site-packages/kicost/kicad_config.py'])
kicost-git W: Referenced python module 'urlparse.urlunsplit' is an uninstalled dependency (needed in files ['usr/lib/python3.11/site-packages/kicost/distributors/dist_local_template.py'])
kicost-git W: Referenced python module 'urllib2.urlopen' is an uninstalled dependency (needed in files ['usr/lib/python3.11/site-packages/kicost/currency_converter/download_rates.py', 'usr/lib/python3.11/site-packages/kicost/distributors/api_tme.py'])
kicost-git E: Dependency python-importlib-metadata detected and not included (python modules ['importlib_metadata.distribution'] needed in files ['usr/bin/kicost'])
kicost-git E: Dependency kicad detected and not included (python modules ['pcbnew.ActionPlugin', 'pcbnew.GetBoard'] needed in files ['usr/lib/python3.11/site-packages/kicost/kicost_kicadplugin.py'])
kicost-git E: Dependency python-yaml detected and not included (python modules ['yaml'] needed in files ['usr/lib/python3.11/site-packages/kicost/__main__.py', 'usr/lib/python3.11/site-packages/kicost/config.py'])
kicost-git E: Dependency python-pip detected and not included (python modules ['pip._internal.main', 'pip', 'pip.main'] needed in files ['usr/lib/python3.11/site-packages/kicost/kicost_kicadplugin.py', 'usr/lib/python3.11/site-packages/kicost/kicost_config.py'])
kicost-git E: Dependency python-setuptools detected and not included (python modules ['pkg_resources.load_entry_point'] needed in files ['usr/bin/kicost'])
kicost-git W: Dependency included, but may not be needed ('python-lxml')

Please check which are really applicable, and (selectively) fix.

Thanks for maintaining!

dreieck commented on 2023-08-02 09:26 (UTC)

This package installes generic, non-package specific, files, which makes it likely to conflict with other packages:

error: failed to commit transaction (conflicting files)
python-protonvpn-nm-lib: /usr/lib/python3.11/site-packages/tests/__init__.py exists in filesystem (owned by kicost-git)
python-protonvpn-nm-lib: /usr/lib/python3.11/site-packages/tests/__pycache__/__init__.cpython-311.opt-1.pyc exists in filesystem (owned by kicost-git)
python-protonvpn-nm-lib: /usr/lib/python3.11/site-packages/tests/__pycache__/__init__.cpython-311.pyc exists in filesystem (owned by kicost-git)
Errors occurred, no packages were upgraded.

pacman -Ql kicost-git | grep /usr/lib/python3.11/site-packages/tests/ lists me the following files which you need to make sure to get not installed:

/usr/lib/python3.11/site-packages/tests/.gitignore
/usr/lib/python3.11/site-packages/tests/README.md
/usr/lib/python3.11/site-packages/tests/__init__.py
/usr/lib/python3.11/site-packages/tests/__pycache__/__init__.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/tests/__pycache__/__init__.cpython-311.pyc
/usr/lib/python3.11/site-packages/tests/__pycache__/dummy-web-server.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/tests/__pycache__/dummy-web-server.cpython-311.pyc
/usr/lib/python3.11/site-packages/tests/configs/default.yaml
/usr/lib/python3.11/site-packages/tests/dummy-web-server.py
/usr/lib/python3.11/site-packages/tests/expected_test/test.csv
[...]
/usr/lib/python3.11/site-packages/tests/group_1.xml
/usr/lib/python3.11/site-packages/tests/no_empty_overwrite.xml
/usr/lib/python3.11/site-packages/tests/test.cmd
/usr/lib/python3.11/site-packages/tests/test.sh
/usr/lib/python3.11/site-packages/tests/test.xml
/usr/lib/python3.11/site-packages/tests/test2.xml
/usr/lib/python3.11/site-packages/tests/test3.xml

I doubt that anything under /usr/lib/python3.11/site-packages/tests/ is needed at all for this package. Please check if you can remove it or move it to some kicost specific directory.

Please fix!, Regards, thanks for maintaining!

rhssk commented on 2018-06-26 16:55 (UTC)

Thanks, updated.

<deleted-account> commented on 2018-06-26 16:11 (UTC)

The unit tests seem to require python-requests.