Merge pull request #120806 from mweinelt/python/pynndescent

This commit is contained in:
Martin Weinelt 2021-04-28 03:24:44 +02:00 committed by GitHub
commit 1ee0595d5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 38 deletions

View file

@ -1,12 +1,14 @@
{ lib
, buildPythonPackage
, fetchPypi
, scikitlearn
, numpy
, matplotlib
, scipy
, deprecated
, hopcroftkarp
, pytest
, joblib
, matplotlib
, numpy
, scikitlearn
, scipy
, pytestCheckHook
}:
buildPythonPackage rec {
@ -19,26 +21,24 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [
scikitlearn
numpy
matplotlib
scipy
deprecated
hopcroftkarp
joblib
matplotlib
numpy
scikitlearn
scipy
];
checkInputs = [
pytest
pytestCheckHook
];
checkPhase = ''
preCheck = ''
# specifically needed for darwin
export HOME=$(mktemp -d)
mkdir -p $HOME/.matplotlib
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
# ignore tests due to python 2.7 fail
pytest --ignore test/test_plots.py \
--ignore test/test_visuals.py
'';
meta = with lib; {

View file

@ -1,7 +1,6 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, nose
, scikitlearn
, scipy
@ -12,25 +11,13 @@
buildPythonPackage rec {
pname = "pynndescent";
version = "0.5.1";
version = "0.5.2";
src = fetchPypi {
inherit pname version;
sha256 = "74a05a54d13573a38878781d44812ac6df97d8762a56f9bb5dd87a99911820fe";
sha256 = "0w87c2v0li2rdbx6qfc2lb6y6bxpdy3jwfgzfs1kcr4d1chj5zfr";
};
patches = [
# fixes tests, included in 0.5.2
(fetchpatch {
url = "https://github.com/lmcinnes/pynndescent/commit/ef5d8c3c3bfe976063b6621e3e0734c0c22d813b.patch";
sha256 = "sha256-49n3kevs3wpzd4FfZVKmNpF2o1V8pJs4KOx8zCAhR3s=";
})
];
checkInputs = [
nose
];
propagatedBuildInputs = [
scikitlearn
scipy
@ -39,6 +26,10 @@ buildPythonPackage rec {
joblib
];
checkInputs = [
nose
];
checkPhase = ''
nosetests
'';

View file

@ -13,21 +13,15 @@
buildPythonPackage rec {
pname = "umap-learn";
version = "0.5.0";
version = "0.5.1";
src = fetchFromGitHub {
owner = "lmcinnes";
repo = "umap";
rev = version;
sha256 = "sha256-2Z5RDi4bz8hh8zMwkcCQY9NrGaVd1DJEBOmrCl2oSvM=";
sha256 = "0favphngcz5jvyqs06x07hk552lvl9qx3vka8r4x0xmv88gsg349";
};
checkInputs = [
nose
tensorflow
pytestCheckHook
];
propagatedBuildInputs = [
numpy
scikitlearn
@ -36,6 +30,12 @@ buildPythonPackage rec {
pynndescent
];
checkInputs = [
nose
tensorflow
pytestCheckHook
];
preCheck = ''
export HOME=$TMPDIR
'';