nixpkgs/pkgs/development/python-modules/testpath/default.nix
Michael Daniels 075e8c2c4f
treewide: change 'format = "pyproject";' to 'pyproject = true;'
This is almost all find-and-replace.

I manually edited:
* pkgs/development/python-modules/notifications-android-tv/default.nix,
* pkgs/servers/home-assistant/default.nix,
* pkgs/development/tools/continuous-integration/buildbot/master.nix

A few files have not been changed in this PR because they would cause rebuilds.

This PR should have 0 rebuilds.
2026-01-12 17:50:35 -05:00

40 lines
1,014 B
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
flit-core,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "testpath";
version = "0.6.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-LxuX5kQsAmgevgG9hPUxAop8rqGvOCUAD1I0XDAoXg8=";
};
nativeBuildInputs = [ flit-core ];
nativeCheckInputs = [ pytestCheckHook ];
# exe are only required when testpath is used on windows
# https://github.com/jupyter/testpath/blob/de8ca59539eb23b9781e55848b7d2646c8c61df9/testpath/commands.py#L128
preBuild = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
rm testpath/cli-32.exe testpath/cli-64.exe
'';
preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
# Work around https://github.com/jupyter/testpath/issues/24
export TMPDIR="/tmp"
'';
meta = {
description = "Test utilities for code working with files and commands";
license = lib.licenses.mit;
homepage = "https://github.com/jupyter/testpath";
};
}