depot/third_party/nixpkgs/pkgs/development/python-modules/tox/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

79 lines
1.4 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, packaging
, pluggy
, py
, six
, virtualenv
, setuptools-scm
, toml
, tomli
, filelock
, hatchling
, hatch-vcs
, platformdirs
, pyproject-api
, colorama
, chardet
, cachetools
, testers
, tox
}:
buildPythonPackage rec {
pname = "tox";
version = "4.11.3";
format = "pyproject";
src = fetchFromGitHub {
owner = "tox-dev";
repo = "tox";
rev = "refs/tags/${version}";
hash = "sha256-VLoWRAiQ1TP9S0f8TKwQ0H2Lgemd+dTzSM+TjhioDMk=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "packaging>=22" "packaging"
'';
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
hatchling
hatch-vcs
];
propagatedBuildInputs = [
cachetools
chardet
colorama
filelock
packaging
platformdirs
pluggy
py
pyproject-api
six
toml
virtualenv
] ++ lib.optionals (pythonOlder "3.11") [
tomli
];
doCheck = false; # infinite recursion via devpi-client
passthru.tests = {
version = testers.testVersion { package = tox; };
};
meta = with lib; {
changelog = "https://github.com/tox-dev/tox/releases/tag/${version}";
description = "A generic virtualenv management and test command line tool";
homepage = "https://github.com/tox-dev/tox";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}