Merge pull request #389 from rskew/master

Enable '+' in package versions, and some overrides
This commit is contained in:
adisbladis 2021-09-17 21:16:48 -05:00 committed by GitHub
commit ef69c70a5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 1 deletions

View file

@ -38,7 +38,7 @@ pythonPackages.callPackage
fileCandidates =
let
supportedRegex = ("^.*(" + builtins.concatStringsSep "|" supportedExtensions + ")");
matchesVersion = fname: builtins.match ("^.*" + builtins.replaceStrings [ "." ] [ "\\." ] version + ".*$") fname != null;
matchesVersion = fname: builtins.match ("^.*" + builtins.replaceStrings [ "." "+" ] [ "\\." "\\+" ] version + ".*$") fname != null;
hasSupportedExtension = fname: builtins.match supportedRegex fname != null;
isCompatibleEgg = fname: ! lib.strings.hasSuffix ".egg" fname || lib.strings.hasSuffix "py${python.pythonVersion}.egg" fname;
in

View file

@ -58,6 +58,12 @@ self: super:
'';
});
argcomplete = super.argcomplete.overridePythonAttrs (
old: rec {
buildInputs = (old.buildInputs or [ ]) ++ [ self.importlib-metadata ];
}
);
arpeggio = super.arpeggio.overridePythonAttrs (
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ];
@ -352,6 +358,12 @@ self: super:
}
);
gitpython = super.gitpython.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.typing-extensions ];
}
);
grpcio = super.grpcio.overridePythonAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.cython pkgs.pkg-config ];
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.c-ares pkgs.openssl pkgs.zlib ];
@ -562,6 +574,13 @@ self: super:
}
);
jupyterlab-widgets = super.jupyterlab-widgets.overridePythonAttrs (
old: rec {
buildInputs = (old.buildInputs or [ ]) ++ [ self.jupyter-packaging ];
}
);
keyring = super.keyring.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [
@ -688,6 +707,7 @@ self: super:
cat > setup.cfg <<EOF
[libs]
system_freetype = True
system_qhull = True
'' + lib.optionalString stdenv.isDarwin ''
# LTO not working in darwin stdenv, see NixOS/nixpkgs/pull/19312
enable_lto = false
@ -698,12 +718,17 @@ self: super:
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [
pkgs.libpng
pkgs.freetype
pkgs.qhull
]
++ lib.optionals enableGtk3 [ pkgs.cairo self.pycairo pkgs.gtk3 pkgs.gobject-introspection self.pygobject3 ]
++ lib.optionals enableTk [ pkgs.tcl pkgs.tk self.tkinter pkgs.libX11 ]
++ lib.optionals enableQt [ self.pyqt5 ]
;
preBuild = ''
cp -r ${pkgs.qhull} .
'';
inherit (super.matplotlib) patches;
}
);
@ -728,6 +753,12 @@ self: super:
}
);
mmdet = super.mmdet.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytorch ];
}
);
molecule =
if lib.versionOlder super.molecule.version "3.0.0" then
(super.molecule.overridePythonAttrs (
@ -871,6 +902,12 @@ self: super:
}
);
opencv-python = super.opencv-python.overridePythonAttrs (
old: rec {
buildInputs = (old.buildInputs or [ ]) ++ [ self.scikit-build ];
}
);
openexr = super.openexr.overridePythonAttrs (
old: rec {
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.openexr pkgs.ilmbase ];
@ -1407,6 +1444,13 @@ self: super:
}
);
pywavelets = super.pywavelets.overridePythonAttrs (
old: {
HDF5_DIR = "${pkgs.hdf5}";
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.hdf5 ];
}
);
pyzmq = super.pyzmq.overridePythonAttrs (
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];
@ -1574,6 +1618,7 @@ self: super:
tables = super.tables.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.pywavelets ];
HDF5_DIR = "${pkgs.hdf5}";
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];
propagatedBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.hdf5 self.numpy self.numexpr ];
@ -1591,6 +1636,27 @@ self: super:
}
);
tensorboard = super.tensorboard.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [
self.wheel
self.absl-py
];
HDF5_DIR = "${pkgs.hdf5}";
propagatedBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
pkgs.hdf5
self.google-auth-oauthlib
self.tensorboard-plugin-wit
self.numpy
self.markdown
self.tensorboard-data-server
self.grpcio
self.protobuf
self.werkzeug
];
}
);
tensorflow = super.tensorflow.overridePythonAttrs (
old: {
postInstall = ''