1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 setuptools,
7 unittestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "timecop";
12 version = "0.5.0dev";
13 pyproject = true;
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-jYcA3gByT5RydMU8eK+PUnWe9TrRQ/chw+F6wTUqcX0=";
20 };
21
22 build-system = [ setuptools ];
23
24 nativeCheckInputs = [ unittestCheckHook ];
25
26 # test_epoch fails, see https://github.com/bluekelp/pytimecop/issues/4
27 preCheck = ''
28 sed -i 's/test_epoch/_test_epoch/' timecop/tests/test_freeze.py
29 '';
30
31 pythonImportsCheck = [ "timecop" ];
32
33 meta = with lib; {
34 description = "Port of the most excellent TimeCop Ruby Gem for Python";
35 homepage = "https://github.com/bluekelp/pytimecop";
36 license = licenses.gpl3Plus;
37 maintainers = with maintainers; [ zakame ];
38 };
39}