mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
mypy: Don't patch if format is wheel
We don't have the sources if it's a wheel, and hence cant/dont need to patch.
This commit is contained in:
parent
96e3794e5d
commit
5612b5cbdf
1 changed files with 12 additions and 11 deletions
|
@ -1064,6 +1064,18 @@ lib.composeManyExtensions [
|
|||
|
||||
mypy = super.mypy.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [
|
||||
self.types-typed-ast
|
||||
];
|
||||
# Compile mypy with mypyc, which makes mypy about 4 times faster. The compiled
|
||||
# version is also the default in the wheels on Pypi that include binaries.
|
||||
# is64bit: unfortunately the build would exhaust all possible memory on i686-linux.
|
||||
MYPY_USE_MYPYC = stdenv.buildPlatform.is64bit;
|
||||
|
||||
# when testing reduce optimisation level to drastically reduce build time
|
||||
# (default is 3)
|
||||
# MYPYC_OPT_LEVEL = 1;
|
||||
} // lib.optionalAttrs (old.format != "wheel") {
|
||||
# FIXME: Remove patch after upstream has decided the proper solution.
|
||||
# https://github.com/python/mypy/pull/11143
|
||||
patches = (old.patches or [ ]) ++ lib.optionals ((lib.strings.versionAtLeast old.version "0.900") && lib.strings.versionOlder old.version "0.940") [
|
||||
|
@ -1077,17 +1089,6 @@ lib.composeManyExtensions [
|
|||
sha256 = "sha256-waIZ+m3tfvYE4HJ8kL6rN/C4fMjvLEe9UoPbt9mHWIM=";
|
||||
})
|
||||
];
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [
|
||||
self.types-typed-ast
|
||||
];
|
||||
# Compile mypy with mypyc, which makes mypy about 4 times faster. The compiled
|
||||
# version is also the default in the wheels on Pypi that include binaries.
|
||||
# is64bit: unfortunately the build would exhaust all possible memory on i686-linux.
|
||||
MYPY_USE_MYPYC = stdenv.buildPlatform.is64bit;
|
||||
|
||||
# when testing reduce optimisation level to drastically reduce build time
|
||||
# (default is 3)
|
||||
# MYPYC_OPT_LEVEL = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue