python3Packages.git-annex-adapter: fix build

The exception message is broken becuase of some uppercase vs. lowercase
issues that have been patched accordingly.

Additionally use `fetchpatch` rather than `fetchurl` to apply patches
into the build.
This commit is contained in:
Maximilian Bosch 2018-06-21 23:14:02 +02:00
parent 3813d5dcec
commit 47558d9e04
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
2 changed files with 24 additions and 7 deletions

View File

@ -1,5 +1,6 @@
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, fetchurl { stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, fetchpatch
, utillinux, pygit2, gitMinimal, git-annex }: , utillinux, pygit2, gitMinimal, git-annex
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "git-annex-adapter"; pname = "git-annex-adapter";
@ -22,10 +23,13 @@ buildPythonPackage rec {
''; '';
# TODO: Remove for next version # TODO: Remove for next version
patches = fetchurl { patches = [
./not-a-git-repo-testcase.patch
(fetchpatch {
url = "https://github.com/alpernebbi/git-annex-adapter/commit/9f64c4b99cae7b681820c6c7382e1e40489f4d1e.patch"; url = "https://github.com/alpernebbi/git-annex-adapter/commit/9f64c4b99cae7b681820c6c7382e1e40489f4d1e.patch";
sha256 = "1hbw8651amjskakvs1wv2msd1wryrq0vpryvbispg5267rs8q7hp"; sha256 = "0yh66gial6bx7kbl7s7lkzljnkpgvgr8yahqqcq9z76d0w752dir";
}; })
];
checkInputs = [ checkInputs = [
utillinux # `rev` is needed in tests/test_process.py utillinux # `rev` is needed in tests/test_process.py
@ -43,6 +47,6 @@ buildPythonPackage rec {
homepage = https://github.com/alpernebbi/git-annex-adapter; homepage = https://github.com/alpernebbi/git-annex-adapter;
description = "Call git-annex commands from Python"; description = "Call git-annex commands from Python";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ]; maintainers = with maintainers; [ dotlambda ma27 ];
}; };
} }

View File

@ -0,0 +1,13 @@
diff --git a/tests/test_process.py b/tests/test_process.py
index 493fc8f..feb1833 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -126,7 +126,7 @@ class TestProcessOnEmptyDir(TempDirTestCase):
with self.assertRaises(subprocess.CalledProcessError) as cm:
runner('status', '-sb')
self.assertIn(
- "fatal: Not a git repository",
+ "fatal: not a git repository",
cm.exception.stderr,
)