depot/third_party/nixpkgs/pkgs/development/python-modules/measurement/default.nix
Default email 83405b6dd2 Project import generated by Copybara.
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
2023-03-15 17:39:30 +01:00

54 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, buildPythonPackage
, isPy3k
, flit-core
, flit-scm
, sympy
, pytestCheckHook
, sphinx
}:
buildPythonPackage rec {
pname = "measurement";
version = "3.2.2";
format = "pyproject";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "coddingtonbear";
repo = "python-measurement";
rev = "refs/tags/${version}";
hash = "sha256-ULId0W10FaAtSgVY5ctQL3FPETVr+oq6TKWd/W53viM=";
};
nativeBuildInputs = [
flit-core
flit-scm
sphinx
];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov=measurement" ""
'';
propagatedBuildInputs = [
sympy
];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Use and manipulate unit-aware measurement objects in Python";
homepage = "https://github.com/coddingtonbear/python-measurement";
changelog = "https://github.com/coddingtonbear/python-measurement/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ bhipple ];
};
}