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 { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, scikitlearn , deprecated
, numpy
, matplotlib
, scipy
, hopcroftkarp , hopcroftkarp
, pytest , joblib
, matplotlib
, numpy
, scikitlearn
, scipy
, pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -19,26 +21,24 @@ buildPythonPackage rec {
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
scikitlearn deprecated
numpy
matplotlib
scipy
hopcroftkarp hopcroftkarp
joblib
matplotlib
numpy
scikitlearn
scipy
]; ];
checkInputs = [ checkInputs = [
pytest pytestCheckHook
]; ];
checkPhase = '' preCheck = ''
# specifically needed for darwin # specifically needed for darwin
export HOME=$(mktemp -d) export HOME=$(mktemp -d)
mkdir -p $HOME/.matplotlib mkdir -p $HOME/.matplotlib
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc 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; { meta = with lib; {

View File

@ -1,7 +1,6 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, fetchpatch
, nose , nose
, scikitlearn , scikitlearn
, scipy , scipy
@ -12,25 +11,13 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pynndescent"; pname = "pynndescent";
version = "0.5.1"; version = "0.5.2";
src = fetchPypi { src = fetchPypi {
inherit pname version; 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 = [ propagatedBuildInputs = [
scikitlearn scikitlearn
scipy scipy
@ -39,6 +26,10 @@ buildPythonPackage rec {
joblib joblib
]; ];
checkInputs = [
nose
];
checkPhase = '' checkPhase = ''
nosetests nosetests
''; '';

View File

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