mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 16:45:49 +01:00
Merge pull request #174152 from fabaff/numba-scipy-fix
python39Packages.numba-scipy: update stale substituteInPlace
This commit is contained in:
commit
9633a16a9e
11 changed files with 217 additions and 49 deletions
51
pkgs/development/python-modules/aeppl/default.nix
Normal file
51
pkgs/development/python-modules/aeppl/default.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ lib
|
||||
, aesara
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, numdifftools
|
||||
, numpy
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, scipy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aeppl";
|
||||
version = "0.0.31";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aesara-devs";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-fbBtjU2skvfDCnRRW+9PIObsEOfKhl15qSLw3TGhl4k=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aesara
|
||||
numpy
|
||||
scipy
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
numdifftools
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d);
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"aeppl"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library for an Aesara-based PPL";
|
||||
homepage = "https://github.com/aesara-devs/aeppl";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -1,30 +1,33 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, numpy
|
||||
, scipy
|
||||
, filelock
|
||||
, cons
|
||||
, cython
|
||||
, etuples
|
||||
, fetchFromGitHub
|
||||
, filelock
|
||||
, logical-unification
|
||||
, minikanren
|
||||
, cons
|
||||
, numba
|
||||
, numba-scipy
|
||||
, libgpuarray
|
||||
, sympy
|
||||
, cython
|
||||
, numpy
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, scipy
|
||||
, typing-extensions
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aesara";
|
||||
version = "2.5.3";
|
||||
version = "2.6.6";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aesara-devs";
|
||||
repo = "aesara";
|
||||
rev = "refs/tags/rel-${version}";
|
||||
sha256 = "sha256-20nc70gNdcGjtGxv2WxmYxmswNH8v7yGLkToP2iazjc=";
|
||||
hash = "sha256-ChLMQCXw9EBR0hnNYGdkUbiLF+4oCqOxzsKsnsf22Jk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -32,28 +35,41 @@ buildPythonPackage rec {
|
|||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
scipy
|
||||
filelock
|
||||
cons
|
||||
etuples
|
||||
filelock
|
||||
logical-unification
|
||||
minikanren
|
||||
cons
|
||||
numba
|
||||
numba-scipy
|
||||
libgpuarray
|
||||
sympy
|
||||
numpy
|
||||
scipy
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
numba
|
||||
numba-scipy
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "--durations=50" ""
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "aesara" ];
|
||||
pythonImportsCheck = [
|
||||
"aesara"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Don't run the most compute-intense tests
|
||||
"tests/scan/"
|
||||
"tests/tensor/"
|
||||
"tests/sandbox/"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays";
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "arviz";
|
||||
version = "0.12.0";
|
||||
version = "0.12.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
@ -40,7 +40,7 @@ buildPythonPackage rec {
|
|||
owner = "arviz-devs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ClARxgfji/CavEy8g5oeYK7pwSZS1yUIZnBiyTbZ/zU=";
|
||||
hash = "sha256-5P6EXXAAS1Q2eNQuj/5JrDg0lPHfA5K4WaYfKaaXm9s=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
, pyct
|
||||
, scipy
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, nbsmoke
|
||||
, fastparquet
|
||||
, nbconvert
|
||||
|
@ -24,12 +25,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "datashader";
|
||||
version = "0.13.0";
|
||||
version = "0.14.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-6JscHm1QjDmXOLLa83qhAvY/xwvlPM6duQ1lSxnCVV8=";
|
||||
hash = "sha256-VKEDOJV2ITO1gxKLbFQbcem0gEd/fzTIo+QSmZVsMGI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -4,15 +4,19 @@
|
|||
, scipy
|
||||
, numba
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "numba-scipy";
|
||||
version = "0.3.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-qJeoWiG1LdtFB9cME1d8xVaC0BXGDJEYjCOEdHvSkmQ=";
|
||||
hash = "sha256-qJeoWiG1LdtFB9cME1d8xVaC0BXGDJEYjCOEdHvSkmQ=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -21,14 +25,18 @@ buildPythonPackage rec {
|
|||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py --replace "scipy>=0.16,<=1.6.2" "scipy>=0.16,<=1.7.3"
|
||||
# https://github.com/numba/numba-scipy/pull/76
|
||||
substituteInPlace setup.py \
|
||||
--replace "scipy>=0.16,<=1.6.2" "scipy>=0.16"
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "numba" ];
|
||||
pythonImportsCheck = [
|
||||
"numba_scipy"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Extends Numba to make it aware of SciPy";
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
let
|
||||
inherit (cudaPackages) cudatoolkit;
|
||||
in buildPythonPackage rec {
|
||||
version = "0.55.1";
|
||||
version = "0.55.2";
|
||||
pname = "numba";
|
||||
disabled = pythonOlder "3.6" || pythonAtLeast "3.10";
|
||||
disabled = pythonOlder "3.6" || pythonAtLeast "3.11";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-A+kGmiZm0chPk7ANvXFvuP7d6Lssbvr6LwSEKkZELqM=";
|
||||
hash = "sha256-5CjZ4R2bpZKEnMyfegCQA+t9MGEgB+Nlr+dDznEYxvQ=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -42,9 +42,18 @@ in buildPythonPackage rec {
|
|||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
|
||||
|
||||
propagatedBuildInputs = [ numpy llvmlite setuptools ] ++ lib.optionals cudaSupport [ cudatoolkit cudatoolkit.lib ];
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
llvmlite
|
||||
setuptools
|
||||
] ++ lib.optionals cudaSupport [
|
||||
cudatoolkit
|
||||
cudatoolkit.lib
|
||||
];
|
||||
|
||||
nativeBuildInputs = lib.optional cudaSupport [ addOpenGLRunpath ];
|
||||
nativeBuildInputs = lib.optional cudaSupport [
|
||||
addOpenGLRunpath
|
||||
];
|
||||
|
||||
patches = lib.optionals cudaSupport [
|
||||
(substituteAll {
|
||||
|
@ -69,12 +78,14 @@ in buildPythonPackage rec {
|
|||
# ImportError: cannot import name '_typeconv'
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "numba" ];
|
||||
pythonImportsCheck = [
|
||||
"numba"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Compiling Python code using LLVM";
|
||||
homepage = "https://numba.pydata.org/";
|
||||
license = licenses.bsd2;
|
||||
description = "Compiling Python code using LLVM";
|
||||
maintainers = with maintainers; [ fridh ];
|
||||
};
|
||||
}
|
||||
|
|
51
pkgs/development/python-modules/numdifftools/default.nix
Normal file
51
pkgs/development/python-modules/numdifftools/default.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, numpy
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, scipy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "numdifftools";
|
||||
version = "0.9.40";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pbrod";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-YLi9cNHcZ/PlhrhvYOMfRTOt4kinQcfxvqInT8/0Qpg=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
scipy
|
||||
];
|
||||
|
||||
# Tests requires algopy and other modules which are optional and/or not available
|
||||
doCheck = false;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace '"pytest-runner"' ""
|
||||
# Remove optional dependencies
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "algopy>=0.4" "" \
|
||||
--replace "statsmodels>=0.6" ""
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"numdifftools"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library to solve automatic numerical differentiation problems in one or more variables";
|
||||
homepage = "https://github.com/pbrod/numdifftools";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -9,15 +9,20 @@
|
|||
, scikit-learn
|
||||
, scipy
|
||||
, pytestCheckHook
|
||||
, pythonAtLeast
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "persim";
|
||||
version = "0.3.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "ef0f0a247adcf6104ecac14117db0b24581710ea8a8d964816805395700b4975";
|
||||
sha256 = "sha256-7w8KJHrc9hBOysFBF9sLJFgXEOqKjZZIFoBTlXALSXU=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -41,10 +46,26 @@ buildPythonPackage rec {
|
|||
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"persim"
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals (pythonAtLeast "3.10") [
|
||||
# AttributeError: module 'collections' has no attribute 'Iterable'
|
||||
"test_empyt_diagram_list"
|
||||
"test_empty_diagram_list"
|
||||
"test_fit_diagram"
|
||||
"test_integer_diagrams"
|
||||
"test_lists_of_lists"
|
||||
"test_mixed_pairs"
|
||||
"test_multiple_diagrams"
|
||||
"test_n_pixels"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Distances and representations of persistence diagrams";
|
||||
homepage = "https://persim.scikit-tda.org";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.costrouc ];
|
||||
maintainers = with maintainers; [ costrouc ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pynndescent";
|
||||
version = "0.5.6";
|
||||
version = "0.5.7";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-YfsxiFuqxGnWeTPix8k1tu3rsG7kmOLw+d/JfFnTclw=";
|
||||
hash = "sha256-7LOVJV+janSLWHC0ugMA6g99qLGWSGS47dYld6hN/X0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -1,43 +1,45 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, nose
|
||||
, keras
|
||||
, numba
|
||||
, numpy
|
||||
, pynndescent
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, scikit-learn
|
||||
, scipy
|
||||
, numba
|
||||
, pynndescent
|
||||
, tensorflow
|
||||
, tqdm
|
||||
, pytestCheckHook
|
||||
, keras
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "umap-learn";
|
||||
version = "0.5.3";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lmcinnes";
|
||||
repo = "umap";
|
||||
rev = version;
|
||||
sha256 = "sha256-S2+k7Ec4AxsN6d0GUGnU81oLnBgmlZp8OmUFCNaUJYw=";
|
||||
hash = "sha256-S2+k7Ec4AxsN6d0GUGnU81oLnBgmlZp8OmUFCNaUJYw=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numba
|
||||
numpy
|
||||
pynndescent
|
||||
scikit-learn
|
||||
scipy
|
||||
numba
|
||||
pynndescent
|
||||
tqdm
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
nose
|
||||
tensorflow
|
||||
pytestCheckHook
|
||||
keras
|
||||
pytestCheckHook
|
||||
tensorflow
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
|
@ -52,6 +54,7 @@ buildPythonPackage rec {
|
|||
|
||||
# Flaky test. Fails with AssertionError sometimes.
|
||||
"test_sparse_hellinger"
|
||||
"test_densmap_trustworthiness_on_iris_supervised"
|
||||
|
||||
# tensorflow maybe incompatible? https://github.com/lmcinnes/umap/issues/821
|
||||
"test_save_load"
|
||||
|
@ -61,6 +64,6 @@ buildPythonPackage rec {
|
|||
description = "Uniform Manifold Approximation and Projection";
|
||||
homepage = "https://github.com/lmcinnes/umap";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.costrouc ];
|
||||
maintainers = with maintainers; [ costrouc ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -209,6 +209,8 @@ in {
|
|||
|
||||
aenum = callPackage ../development/python-modules/aenum { };
|
||||
|
||||
aeppl = callPackage ../development/python-modules/aeppl { };
|
||||
|
||||
aesara = callPackage ../development/python-modules/aesara { };
|
||||
|
||||
aesedb = callPackage ../development/python-modules/aesedb { };
|
||||
|
@ -5860,6 +5862,8 @@ in {
|
|||
|
||||
numcodecs = callPackage ../development/python-modules/numcodecs { };
|
||||
|
||||
numdifftools = callPackage ../development/python-modules/numdifftools { };
|
||||
|
||||
numericalunits = callPackage ../development/python-modules/numericalunits { };
|
||||
|
||||
numexpr = callPackage ../development/python-modules/numexpr { };
|
||||
|
|
Loading…
Reference in a new issue