

























python-setuptools should be in makedepends, it does not build without
python-build and python-installer are needed to make this package and should be added to makedepends. Thanks!
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() {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Looks like they suggest using the pypi instead of the github tar balls?