python3Packages.takethetime: init at 0.3.1

huantian d868a402 dc183476

+43
+41
pkgs/development/python-modules/takethetime/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , pythonOlder 5 + , pytestCheckHook 6 + }: 7 + 8 + buildPythonPackage { 9 + pname = "takethetime"; 10 + version = "0.3.1"; 11 + 12 + # pypi distribution doesn't include tests, so build from source instead 13 + src = fetchFromGitHub { 14 + owner = "ErikBjare"; 15 + repo = "TakeTheTime"; 16 + rev = "b0042ac5b1cc9d3b70ef59167b094469ceb660dd"; 17 + sha256 = "sha256-DwsMnP6G3BzOnINttaSC6QKkIKK5qyhUz+lN1DSvkw0="; 18 + }; 19 + 20 + disabled = pythonOlder "3.6"; 21 + 22 + nativeCheckInputs = [ pytestCheckHook ]; 23 + 24 + pytestFlagsArray = [ "tests/tests.py" ]; 25 + 26 + pythonImportsCheck = [ "takethetime" ]; 27 + 28 + # Latest release is v0.3.1 on pypi, but this version was not bumped in 29 + # the setup.py, causing packages that depend on v0.3.1 to fail to build. 30 + postPatch = '' 31 + substituteInPlace setup.py \ 32 + --replace "version='0.3'" "version='0.3.1'" 33 + ''; 34 + 35 + meta = with lib; { 36 + description = "Simple time taking library using context managers"; 37 + homepage = "https://github.com/ErikBjare/TakeTheTime"; 38 + maintainers = with maintainers; [ huantian ]; 39 + license = licenses.mit; 40 + }; 41 + }
+2
pkgs/top-level/python-packages.nix
··· 11548 11548 11549 11549 tailscale = callPackage ../development/python-modules/tailscale { }; 11550 11550 11551 + takethetime = callPackage ../development/python-modules/takethetime { }; 11552 + 11551 11553 tank-utility = callPackage ../development/python-modules/tank-utility { }; 11552 11554 11553 11555 tappy = callPackage ../development/python-modules/tappy { };