Files
nixpkgs/pkgs/development/python-modules/backports-tarfile/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

68 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
setuptools-scm,
wheel,
jaraco-test,
pytestCheckHook,
}:
let
self = buildPythonPackage rec {
pname = "backports-tarfile";
version = "1.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jaraco";
repo = "backports.tarfile";
rev = "v${version}";
hash = "sha256-X3rkL35aDG+DnIOq0fI7CFoWGNtgLkLjtT9y6+23oto=";
};
build-system = [
setuptools
setuptools-scm
wheel
];
doCheck = false;
nativeCheckInputs = [
jaraco-test
pytestCheckHook
];
disabledTests = [
# calls python -m backports.tarfile and doesn't find module documentation
"test_bad_use"
"test_create_command"
"test_create_command_compressed"
"test_create_command_dot_started_filename"
"test_create_command_dotless_filename"
"test_extract_command"
"test_extract_command_different_directory"
"test_extract_command_invalid_file"
"test_list_command_invalid_file"
"test_test_command"
"test_test_command_invalid_file"
# chmod: permission denied
"test_modes"
];
pythonImportsCheck = [ "backports.tarfile" ];
passthru.tests.pytest = self.overridePythonAttrs { doCheck = true; };
meta = {
description = "Backport of CPython tarfile module";
homepage = "https://github.com/jaraco/backports.tarfile";
license = lib.licenses.mit;
maintainers = [ ];
};
};
in
self