python311Packages.git-annex-adapter: refactor

This commit is contained in:
Fabian Affolter
2024-01-31 13:47:11 +01:00
parent 2add75a2cf
commit ee3db79b07
@@ -1,20 +1,31 @@
{ lib, buildPythonPackage, isPy3k, fetchFromGitHub, fetchpatch, substituteAll
, python, util-linux, pygit2, gitMinimal, git-annex, cacert
{ lib
, buildPythonPackage
, cacert
, fetchFromGitHub
, fetchpatch
, git-annex
, gitMinimal
, pygit2
, pytestCheckHook
, python
, pythonOlder
, setuptools
, substituteAll
, util-linux
}:
buildPythonPackage rec {
pname = "git-annex-adapter";
version = "0.2.2";
format = "setuptools";
pyproject = true;
disabled = !isPy3k;
disabled = pythonOlder "3.7";
# No tests in PyPI tarball
src = fetchFromGitHub {
owner = "alpernebbi";
repo = pname;
rev = "v${version}";
sha256 = "0666vqspgnvmfs6j3kifwyxr6zmxjs0wlwis7br4zcq0gk32zgdx";
repo = "git-annex-adapter";
rev = "refs/tags/v${version}";
hash = "sha256-vb0vxnwAs0/yOjpyyoGWvX6Tu+cuziGNdnXbdzXexhg=";
};
patches = [
@@ -37,17 +48,24 @@ buildPythonPackage rec {
})
];
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
pygit2
cacert
];
nativeCheckInputs = [
gitMinimal
util-linux # `rev` is needed in tests/test_process.py
pytestCheckHook
];
propagatedBuildInputs = [ pygit2 cacert ];
checkPhase = ''
${python.interpreter} -m unittest
'';
pythonImportsCheck = [ "git_annex_adapter" ];
pythonImportsCheck = [
"git_annex_adapter"
];
meta = with lib; {
homepage = "https://github.com/alpernebbi/git-annex-adapter";