1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 setuptools-scm,
7 wheel,
8 jaraco-test,
9 pytestCheckHook,
10}:
11
12let
13 self = buildPythonPackage rec {
14 pname = "backports-tarfile";
15 version = "1.2.0";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "jaraco";
20 repo = "backports.tarfile";
21 rev = "v${version}";
22 hash = "sha256-X3rkL35aDG+DnIOq0fI7CFoWGNtgLkLjtT9y6+23oto=";
23 };
24
25 build-system = [
26 setuptools
27 setuptools-scm
28 wheel
29 ];
30
31 doCheck = false;
32
33 nativeCheckInputs = [
34 jaraco-test
35 pytestCheckHook
36 ];
37
38 disabledTests = [
39 # calls python -m backports.tarfile and doesn't find module documentation
40 "test_bad_use"
41 "test_create_command"
42 "test_create_command_compressed"
43 "test_create_command_dot_started_filename"
44 "test_create_command_dotless_filename"
45 "test_extract_command"
46 "test_extract_command_different_directory"
47 "test_extract_command_invalid_file"
48 "test_list_command_invalid_file"
49 "test_test_command"
50 "test_test_command_invalid_file"
51 # chmod: permission denied
52 "test_modes"
53 ];
54
55 pythonImportsCheck = [ "backports.tarfile" ];
56
57 passthru.tests.pytest = self.overridePythonAttrs { doCheck = true; };
58
59 meta = with lib; {
60 description = "Backport of CPython tarfile module";
61 homepage = "https://github.com/jaraco/backports.tarfile";
62 license = licenses.mit;
63 maintainers = [ ];
64 };
65 };
66in
67self