depot/third_party/nixpkgs/pkgs/development/python-modules/awesomeversion/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

42 lines
828 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "awesomeversion";
version = "21.11.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "ludeeus";
repo = pname;
rev = version;
sha256 = "sha256-qxN5AdLlzadG0/raeAyJ/37PLgYLndl1JQSVkgdLv/4=";
};
postPatch = ''
# Upstream doesn't set a version
substituteInPlace setup.py \
--replace "main" ${version}
'';
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"awesomeversion"
];
meta = with lib; {
description = "Python module to deal with versions";
homepage = "https://github.com/ludeeus/awesomeversion";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}