Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 31 lines 884 B view raw
1{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, python, typing }: 2let 3 testDir = if isPy3k then "src_py3" else "src_py2"; 4 5in buildPythonPackage rec { 6 pname = "typing_extensions"; 7 version = "3.7.4.1"; 8 9 src = fetchPypi { 10 inherit pname version; 11 sha256 = "091ecc894d5e908ac75209f10d5b4f118fbdb2eb1ede6a63544054bb1edb41f2"; 12 }; 13 14 checkInputs = lib.optional (pythonOlder "3.5") typing; 15 16 # Error for Python3.6: ImportError: cannot import name 'ann_module' 17 # See https://github.com/python/typing/pull/280 18 doCheck = pythonOlder "3.6"; 19 20 checkPhase = '' 21 cd ${testDir} 22 ${python.interpreter} -m unittest discover 23 ''; 24 25 meta = with lib; { 26 description = "Backported and Experimental Type Hints for Python 3.5+"; 27 homepage = https://github.com/python/typing; 28 license = licenses.psfl; 29 maintainers = with maintainers; [ pmiddend ]; 30 }; 31}