Package Details: python-pycocotools 2.0.7-2

Git Clone URL: https://aur.archlinux.org/python-pycocotools.git (read-only, click to copy)
Package Base: python-pycocotools
Description: Official APIs for the MS-COCO dataset
Upstream URL: https://pypi.org/project/pycocotools
Licenses: BSD-2-Clause
Submitter: hottea
Maintainer: hottea (lilac)
Last Packager: lilac
Votes: 3
Popularity: 0.27
First Submitted: 2020-08-11 08:24 (UTC)
Last Updated: 2024-03-15 20:18 (UTC)

Latest Comments

hottea commented on 2024-02-17 16:08 (UTC)

No, there is no tag available in github source. And it's nothing wrong with using the PyPI source.

MarsSeed commented on 2024-02-17 12:22 (UTC)

Hi,

Please kindly use a source tarball from GitHub instead of PyPI, and implement testing in PKGBUILD check():

diff --git c/PKGBUILD i/PKGBUILD
index 04176d1..cece9c1 100644
--- c/PKGBUILD
+++ i/PKGBUILD
@@ -3,5 +3,7 @@
 pkgname=python-pycocotools
 _pkgname=pycocotools
+_gitname=cocoapi
 pkgver=2.0.7
+_commit=41ef6e0fb75042f29f2505482eda93d6fb0e2d7d
 pkgrel=1
 pkgdesc='Official APIs for the MS-COCO dataset'
@@ -20,19 +22,22 @@ makedepends=(
   python-wheel
 )
-
-source=("${_pkgname}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
-        "LICENSE::https://github.com/cocodataset/cocoapi/raw/master/license.txt")
-sha512sums=('39f03f1df283ad9a286d821811a7c3b1d6800e85785200eec91ae9640d2fdad6c1e2a3efb7f65b6b3052292d7b436b73562fe79654f92ef937707ed55e33c774'
-            '5fe64df67e41aa3fa97db466cedfbf659c308db1917d46396721e2d05146083323ef35f18b45e792f2bff70919449fc74394518d60c8ccf63979ae20ceb21595')
+_tardirname="${_gitname}-${_commit}"
+source=("${_pkgname}-${pkgver}-${_commit}.tar.gz::https://github.com/ppwwyyxx/${_gitname}/archive/${_commit}.tar.gz")
+sha512sums=('c007b1ef4e4a6ddbd1fb242b67335233a6357ff617dceaaa11c202396d1dad8d381bc3e6fe597296b1af313056483e920eb713aba56eb8cc1dc97895caeda4c6')

 build() {
-  cd "${_pkgname}-${pkgver}"
+  cd "${_tardirname}/PythonAPI"
   python -m build --wheel --no-isolation --skip-dependency-check
 }

+check() {
+  cd "${_tardirname}"
+  python tests/test_cases.py
+}
+
 package() {
-  cd "${_pkgname}-${pkgver}"
+  cd "${_tardirname}/PythonAPI"
   python -m installer --destdir="${pkgdir}" dist/*.whl
-  install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm644 ../license.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
 }
 # vim:set ts=2 sw=2 et: