2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
unittestCheckHook,
|
|
|
|
}:
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "timecop";
|
|
|
|
version = "0.5.0dev";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-jYcA3gByT5RydMU8eK+PUnWe9TrRQ/chw+F6wTUqcX0=";
|
2021-10-17 02:12:59 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
# test_epoch fails, see https://github.com/bluekelp/pytimecop/issues/4
|
|
|
|
preCheck = ''
|
|
|
|
sed -i 's/test_epoch/_test_epoch/' timecop/tests/test_freeze.py
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "timecop" ];
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Port of the most excellent TimeCop Ruby Gem for Python";
|
2021-10-17 02:12:59 +00:00
|
|
|
homepage = "https://github.com/bluekelp/pytimecop";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ zakame ];
|
|
|
|
};
|
|
|
|
}
|