2023-01-20 10:41:00 +00:00
|
|
|
{ lib
|
2023-02-02 18:25:31 +00:00
|
|
|
, beautifulsoup4
|
2023-01-20 10:41:00 +00:00
|
|
|
, buildPythonPackage
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, numpy
|
|
|
|
, pytest-console-scripts
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyvips
|
|
|
|
, scipy
|
2023-01-20 10:41:00 +00:00
|
|
|
, setuptools-scm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scooby";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.7.1";
|
|
|
|
format = "setuptools";
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "banesullivan";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-wKbCIA6Xp+VYhcQ5ZpHo5usB+ksnMAJyv5naBvl4Cxo=";
|
2023-01-20 10:41:00 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "python_requires='>=3.7.*'" "python_requires='>=3.7'"
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
beautifulsoup4
|
|
|
|
numpy
|
|
|
|
pytest-console-scripts
|
|
|
|
pytestCheckHook
|
|
|
|
pyvips
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export PATH="$PATH:$out/bin";
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"scooby"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests have additions requirements (e.g., time and module)
|
|
|
|
"test_get_version"
|
|
|
|
"test_tracking"
|
|
|
|
"test_import_os_error"
|
|
|
|
"test_import_time"
|
|
|
|
];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/banesullivan/scooby/releases/tag/v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
description = "A lightweight tool for reporting Python package versions and hardware resources";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://github.com/banesullivan/scooby";
|
2023-01-20 10:41:00 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ wegank ];
|
|
|
|
};
|
|
|
|
}
|