python3Packages.typing-extensions: 3.10.0.2 -> 4.0.1
This commit is contained in:
parent
2a0966e816
commit
580d3db631
@ -1,27 +1,41 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, python, typing }:
|
{ lib
|
||||||
let
|
, buildPythonPackage
|
||||||
testDir = if isPy3k then "src_py3" else "src_py2";
|
, fetchPypi
|
||||||
|
, flit-core
|
||||||
|
, python
|
||||||
|
, pythonOlder
|
||||||
|
}:
|
||||||
|
|
||||||
in buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "typing_extensions";
|
pname = "typing-extensions";
|
||||||
version = "3.10.0.2";
|
version = "4.0.1";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
pname = "typing_extensions";
|
||||||
sha256 = "49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e";
|
inherit version;
|
||||||
|
hash = "sha256-TKCR3qFJ+UXsVq+0ja5xTyHoaS7yKjlSI7zTKJYbag4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = lib.optional (pythonOlder "3.5") typing;
|
nativeBuildInputs = [
|
||||||
|
flit-core
|
||||||
|
];
|
||||||
|
|
||||||
# Error for Python3.6: ImportError: cannot import name 'ann_module'
|
postPatch = ''
|
||||||
# See https://github.com/python/typing/pull/280
|
# Remove metadata for README which are outdated
|
||||||
doCheck = pythonOlder "3.6";
|
sed -i -e '11,24d' pyproject.toml
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
cd ${testDir}
|
|
||||||
${python.interpreter} -m unittest discover
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Tests are not part of PyPI releases. GitHub source can't be used
|
||||||
|
# as it ends with an infinite recursion
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"typing_extensions"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Backported and Experimental Type Hints for Python 3.5+";
|
description = "Backported and Experimental Type Hints for Python 3.5+";
|
||||||
homepage = "https://github.com/python/typing";
|
homepage = "https://github.com/python/typing";
|
||||||
|
Loading…
Reference in New Issue
Block a user