pyp: cleanup (#417604)

This commit is contained in:
Florian Klink
2025-06-17 20:22:15 +03:00
committed by GitHub
+12 -18
View File
@@ -1,13 +1,16 @@
{
lib,
bc,
python3Packages,
fetchFromGitHub,
# tests
addBinToPathHook,
bc,
jq,
python3,
versionCheckHook,
}:
let
pythonPackages = python3.pkgs;
finalAttrs = {
pname = "pyp";
version = "1.3.0";
@@ -21,35 +24,26 @@ let
pyproject = true;
build-system = with pythonPackages; [
build-system = with python3Packages; [
flit-core
];
nativeCheckInputs =
(with pythonPackages; [
(with python3Packages; [
pytestCheckHook
])
++ [
addBinToPathHook
bc
jq
versionCheckHook
];
versionCheckProgramArg = "--version";
pythonImportsCheck = [
"pyp"
];
# without this, the tests fail because they are unable to find the pyp tool
# itself...
preCheck = ''
_OLD_PATH_=$PATH
PATH=$out/bin:$PATH
'';
# And a cleanup!
postCheck = ''
PATH=$_OLD_PATH_
'';
meta = {
homepage = "https://github.com/hauntsaninja/pyp";
description = "Easily run Python at the shell";
@@ -62,4 +56,4 @@ let
};
};
in
pythonPackages.buildPythonPackage finalAttrs
python3Packages.buildPythonPackage finalAttrs