From 19ba7296e9f233ebcb0315d381fcba4d1cc6e33a Mon Sep 17 00:00:00 2001 From: Alan Brown Date: Wed, 21 Jul 2021 13:38:48 +0100 Subject: [PATCH 1/2] pass-import: update to version 3.2 added dependency removed check and changed dependencies --- srcpkgs/pass-import/template | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/srcpkgs/pass-import/template b/srcpkgs/pass-import/template index 73a2fca03041..8d20aeb84739 100644 --- a/srcpkgs/pass-import/template +++ b/srcpkgs/pass-import/template @@ -1,20 +1,13 @@ # Template file for 'pass-import' pkgname=pass-import -version=3.1 +version=3.2 revision=1 build_style=gnu-makefile -hostmakedepends="python3-setuptools python3-yaml" -depends="pass>=1.7.0 python3-defusedxml python3-magic - python3-cryptography python3-SecretStorage python3-pykeepass" -checkdepends="pass python3-defusedxml python3-magic python3-cryptography - python3-SecretStorage python3-pykeepass" +hostmakedepends="python3-setuptools" +depends="pass python3-defusedxml python3-magic python3-cryptography python3-SecretStorage python3-pykeepass python3-yaml" short_desc="Pass extension for importing data from most existing password managers" maintainer="Alan Brown " license="GPL-3.0-or-later" homepage="https://github.com/roddhjav/pass-import" distfiles="https://github.com/roddhjav/pass-import/releases/download/v${version}/pass-import-${version}.tar.gz" -checksum=659d2b503a18d57c9d63dee216d042d0e24f88576cdd0c7fc4b3426e40dbdbc2 - -do_check() { - python3 setup.py test -} +checksum=d943df14dcfec063a6c881c315ce65813db6e105b14a9b0156a73dcf7e529b76 From 2c6ae96a8710ed13c0320fb73a27f7c4d9221740 Mon Sep 17 00:00:00 2001 From: Alan Brown Date: Sun, 25 Jul 2021 11:20:48 +0100 Subject: [PATCH 2/2] pytest testing --- srcpkgs/pass-import/template | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/srcpkgs/pass-import/template b/srcpkgs/pass-import/template index 8d20aeb84739..d096daf208a6 100644 --- a/srcpkgs/pass-import/template +++ b/srcpkgs/pass-import/template @@ -2,12 +2,27 @@ pkgname=pass-import version=3.2 revision=1 -build_style=gnu-makefile +build_style=python3-module hostmakedepends="python3-setuptools" depends="pass python3-defusedxml python3-magic python3-cryptography python3-SecretStorage python3-pykeepass python3-yaml" +checkdepends="python3-pytest python3-devel $depends" short_desc="Pass extension for importing data from most existing password managers" maintainer="Alan Brown " license="GPL-3.0-or-later" homepage="https://github.com/roddhjav/pass-import" distfiles="https://github.com/roddhjav/pass-import/releases/download/v${version}/pass-import-${version}.tar.gz" checksum=d943df14dcfec063a6c881c315ce65813db6e105b14a9b0156a73dcf7e529b76 + +do_check() { + + # Must export PYTHONPATH so subprocesses see the variable + local _pypath="${PYTHONPATH}" + export PYTHONPATH="${PWD}/src:${PYTHONPATH}" + python3 -m pytest --ignore=tests/test_macosx_libfile.py + + if [ -n "${_pypath}" ]; then + export PYTHONPATH="${_pypath}" + else + unset PYTHONPATH + fi +}