Fix mypy dependencies
This commit is contained in:
parent
5f14fab320
commit
cf19b5725f
5 changed files with 76 additions and 10 deletions
|
|
@ -2,17 +2,24 @@
|
|||
lib,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
# Injected dependencies
|
||||
mypy-extensions,
|
||||
typed-ast,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonPackage rec {
|
||||
# mypy 0.780 is the last version with --py2 support
|
||||
# Built without mypyc so mycpp can extend its classes
|
||||
python3.pkgs.buildPythonPackage (finalAttrs: {
|
||||
pname = "mypy";
|
||||
# This is the version oils-for-unix uses for mycpp Python-to-C++ translation
|
||||
version = "0.780";
|
||||
|
||||
pyproject = true;
|
||||
build-system = [ python3.pkgs.setuptools ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python";
|
||||
repo = "mypy";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
# Fetch submodules to include typeshed (required for type stubs)
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-czwCx6ZjCu3CrVmbI6NbstzWM0GvuPTWJiiUhXSznu4=";
|
||||
|
|
@ -27,14 +34,18 @@ python3.pkgs.buildPythonPackage rec {
|
|||
# Skip tests to speed up build
|
||||
doCheck = false;
|
||||
|
||||
dependencies = with python3.pkgs; [
|
||||
# Skip runtime dependency check since we're using pinned older versions
|
||||
pythonRuntimeDepsCheck = false;
|
||||
dontCheckRuntimeDeps = true;
|
||||
|
||||
dependencies = [
|
||||
mypy-extensions
|
||||
typing-extensions
|
||||
typed-ast
|
||||
python3.pkgs.typing-extensions
|
||||
];
|
||||
|
||||
# Ensure we're not pulling in a compiled version
|
||||
pythonImportsCheck = [ "mypy" ];
|
||||
|
||||
meta.license = lib.licenses.mit;
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue