depot/third_party/nixpkgs/pkgs/development/python-modules/contextlib2/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

34 lines
767 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pythonAtLeast,
pythonOlder,
unittestCheckHook,
}:
buildPythonPackage rec {
pname = "contextlib2";
version = "21.6.0";
format = "setuptools";
# Python 3.11 not currently supported
# https://github.com/jazzband/contextlib2/issues/43
disabled = pythonOlder "3.6" || pythonAtLeast "3.11";
src = fetchPypi {
inherit pname version;
hash = "sha256-qx4r/h0B2Wjht+jZAjvFHvNQm7ohe7cwzuOCfh7oKGk=";
};
nativeCheckInputs = [ unittestCheckHook ];
pythonImportsCheck = [ "contextlib2" ];
meta = with lib; {
description = "Backports and enhancements for the contextlib module";
homepage = "https://contextlib2.readthedocs.org/";
license = licenses.psfl;
maintainers = [ ];
};
}