depot/third_party/nixpkgs/pkgs/development/python-modules/timecop/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

39 lines
865 B
Nix

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