2018-06-05 20:12:05 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, python, typing }:
|
|
|
|
let
|
|
|
|
testDir = if isPy3k then "src_py3" else "src_py2";
|
|
|
|
|
|
|
|
in buildPythonPackage rec {
|
|
|
|
pname = "typing_extensions";
|
2020-08-29 11:41:52 +00:00
|
|
|
version = "3.7.4.3";
|
2018-06-05 20:12:05 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-29 11:41:52 +00:00
|
|
|
sha256 = "99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c";
|
2018-06-05 20:12:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = lib.optional (pythonOlder "3.5") typing;
|
|
|
|
|
|
|
|
# Error for Python3.6: ImportError: cannot import name 'ann_module'
|
|
|
|
# See https://github.com/python/typing/pull/280
|
|
|
|
doCheck = pythonOlder "3.6";
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
cd ${testDir}
|
|
|
|
${python.interpreter} -m unittest discover
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Backported and Experimental Type Hints for Python 3.5+";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/python/typing";
|
2018-06-05 20:12:05 +00:00
|
|
|
license = licenses.psfl;
|
|
|
|
maintainers = with maintainers; [ pmiddend ];
|
|
|
|
};
|
|
|
|
}
|