Package Details: python-qbittorrent-api 2024.2.59-1

Git Clone URL: https://aur.archlinux.org/python-qbittorrent-api.git (read-only, click to copy)
Package Base: python-qbittorrent-api
Description: Python client for qBittorrent v4.1+ Web API
Upstream URL: https://pypi.org/project/qbittorrent-api
Licenses: MIT
Submitter: KokaKiwi
Maintainer: KokaKiwi
Last Packager: KokaKiwi
Votes: 0
Popularity: 0.000000
First Submitted: 2022-03-13 13:33 (UTC)
Last Updated: 2024-02-28 23:25 (UTC)

Latest Comments

fryfrog commented on 2023-11-10 05:07 (UTC)

LookupError: setuptools-scm was unable to detect version for /home/fryfrog/.cache/paru/clone/python-qbittorrent-api/src/qbittorrent-api-2023.11.55.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

Looks like they suggest using the pypi instead of the github tar balls?

atticf commented on 2023-04-07 04:32 (UTC)

python-setuptools should be in makedepends, it does not build without

kmarius commented on 2023-02-06 20:20 (UTC)

python-build and python-installer are needed to make this package and should be added to makedepends. Thanks!

slimb commented on 2022-09-23 07:25 (UTC)

One of the tests, conftest.py, expects the sys.path to be like "$_pkgname" and not "$_pkgname-$pkgver".

I'm sure there's a few ways you could fix this, such as changing extract path or even deleting the assert - I'm not sure why the check is there in the first place, but I just opted to patch the test to accept an env var to override basepath

conftest.patch:

--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -29,7 +29,7 @@

 BASE_PATH = sys_path[0]
 RESOURCES = path.join(BASE_PATH, "tests", "resources")
-assert BASE_PATH.split("/")[-1] == "qbittorrent-api"
+assert BASE_PATH.split("/")[-1] == environ.get("BASE_PATH", "qbittorrent-api")

 _check_limit = 10

And then patched the PKGBUILD as such:

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,9 +11,16 @@
 depends=('python' 'python-requests' 'python-urllib3' 'python-six')
 makedepends=('python-setuptools')
 checkdepends=('python-pytest')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/rmartin16/qbittorrent-api/archive/refs/tags/v$pkgver.tar.gz")
-sha256sums=('43a0d56a66834efb349e7b26b7bba89d803513f4479481e9ac6b033e2513ee91')
-b2sums=('33ecc9e300337976bb893812d0e34eb2b08f481ca3afc60db8d75ecfa1cd2c79a37d0ea892f5dd55b43ade327f458294525290c16805bf60070f04214f882e87')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/rmartin16/qbittorrent-api/archive/refs/tags/v$pkgver.tar.gz" 'conftest.patch')
+sha256sums=('43a0d56a66834efb349e7b26b7bba89d803513f4479481e9ac6b033e2513ee91'
+            'a1ab4a551b19dbc9857bf613fb65ebc5ce57709c6c41c57fc86391e61eed3241')
+b2sums=('33ecc9e300337976bb893812d0e34eb2b08f481ca3afc60db8d75ecfa1cd2c79a37d0ea892f5dd55b43ade327f458294525290c16805bf60070f04214f882e87'
+        'f53682e980e596cf7e98a1356d767155e74dc9b4c488f9a81c76da1b8b2f84e4f6515dfe31cd9dd2e705505d851b85a67b2ab763883c887d592c8251aba816ad')
+
+prepare() {
+  cd "$_pkgname-$pkgver"
+  patch -Np1 -i ../conftest.patch
+}

 build() {
   cd "$_pkgname-$pkgver"
@@ -24,8 +31,7 @@
 check() {
   cd "$_pkgname-$pkgver"

-  export PYTHONPATH="build/lib"
-  python setup.py test
+  env PYTHONPATH="build/lib" BASE_PATH="$_pkgname-$pkgver" python setup.py test
 }

 package() {