nixpkgs/pkgs/development/python-modules/measurement/default.nix
Martin Weinelt 8056f9250c
treewide: remove redundant SETUPTOOLS_SCM_PRETEND_VERSION usage
The setuptools-scm packages gained a setup hook, that sets it to the
derivation version automatically, so setting it to that manually has
become redundant.

This also affects downstream consumers of setuptools-scm, like hatch-vcs
or flit-scm.
2023-12-20 20:16:39 +01:00

53 lines
1.0 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
];
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 ];
};
}