depot/third_party/nixpkgs/pkgs/development/python-modules/ubelt/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

71 lines
1.4 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
wheel,
numpy,
python-dateutil,
xxhash,
pytestCheckHook,
requests,
xdoctest,
}:
buildPythonPackage rec {
pname = "ubelt";
version = "1.3.6";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Erotemic";
repo = "ubelt";
rev = "refs/tags/v${version}";
hash = "sha256-ygoJqyTscfuZVDGVbrZobZFvlcuF4HavTU65tmhyU+w=";
};
nativeBuildInputs = [
setuptools
wheel
];
optional-dependencies = {
optional = [
numpy
python-dateutil
xxhash
];
};
nativeCheckInputs = [
pytestCheckHook
requests
xdoctest
];
preCheck = ''
export HOME=$TMPDIR
'';
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# fail due to sandbox environment
"CacheStamp.expired"
"userhome"
];
pythonImportsCheck = [ "ubelt" ];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Python utility library with a stdlib like feel and extra batteries. Paths, Progress, Dicts, Downloads, Caching, Hashing: ubelt makes it easy";
homepage = "https://github.com/Erotemic/ubelt";
changelog = "https://github.com/Erotemic/ubelt/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ natsukium ];
};
}