Unverified Commit 05452072 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python312Packages.pynndescent: disable on aarch64-linux (#386620)

parents 7c8b6ea9 4cf11a00
Loading
Loading
Loading
Loading
+25 −15
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  importlib-metadata,
  fetchFromGitHub,

  # build-system
  setuptools,

  # dependencies
  joblib,
  llvmlite,
  numba,
  scikit-learn,
  scipy,
  setuptools,

  # tests
  pytestCheckHook,
  pythonOlder,
}:

buildPythonPackage rec {
@@ -18,31 +22,37 @@ buildPythonPackage rec {
  version = "0.5.13";
  pyproject = true;

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-10JUwO4KHu7IRZfV/on+3Pd4WT7qvjLC+XQSk0qYAPs=";
  src = fetchFromGitHub {
    owner = "lmcinnes";
    repo = "pynndescent";
    tag = "release-${version}";
    hash = "sha256-oE/oy5doHduESHlRPuPHruiw1yUZmuUTe6PrgQlT6O8=";
  };

  nativeBuildInputs = [ setuptools ];
  build-system = [ setuptools ];

  propagatedBuildInputs = [
  dependencies = [
    joblib
    llvmlite
    numba
    scikit-learn
    scipy
  ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "pynndescent" ];

  meta = with lib; {
  meta = {
    description = "Nearest Neighbor Descent";
    homepage = "https://github.com/lmcinnes/pynndescent";
    license = licenses.bsd2;
    maintainers = with maintainers; [ mic92 ];
    changelog = "https://github.com/lmcinnes/pynndescent/releases/tag/release-${version}";
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [ mic92 ];
    badPlatforms = [
      # The majority of tests are crashing:
      # Fatal Python error: Segmentation fault
      "aarch64-linux"
    ];
  };
}
+49 −16
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  cython,
  fetchPypi,
  numpy,
  setuptools,

  persim,
  pytestCheckHook,
  pythonOlder,
  scikit-learn,
  scipy,

  # tests
  pytestCheckHook,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
  pname = "ripser";
  version = "0.6.10";
  format = "setuptools";

  disabled = pythonOlder "3.6";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-3Mr6+XrSOVvGbLN25fvg9vJkNyspj9CT5BBxMsH3lIQ=";
  src = fetchFromGitHub {
    owner = "scikit-tda";
    repo = "ripser.py";
    tag = "v${version}";
    hash = "sha256-w6d/JRBYoxvu1r02WbwfG94GvB1NGG2Rwd5maSNYPhg=";
  };

  nativeBuildInputs = [ cython ];
  build-system = [
    cython
    numpy
    setuptools
  ];

  propagatedBuildInputs = [
  dependencies = [
    numpy
    scipy
    scikit-learn
    persim
  ];

  nativeCheckInputs = [ pytestCheckHook ];
  pythonImportsCheck = [ "ripser" ];

  nativeCheckInputs = [
    pytestCheckHook
    writableTmpDirAsHomeHook
  ];

  preCheck = ''
    # specifically needed for darwin
    export HOME=$(mktemp -d)
    mkdir -p $HOME/.matplotlib
    echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
  '';

  pythonImportsCheck = [ "ripser" ];
  disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
    # AssertionError
    # assert np.isinf(h0[0, 1])
    "test_full_nonzerobirths"
    # assert np.max(np.abs(h11 - h12)) <= 2 * res2["r_cover"]
    "test_greedyperm_circlebottleneck"
    # assert np.all(dgm[:,1] >= dgm[:,0])
    "test_returns_dgm"
    # assert tuple(dgm[0]) == (0,np.inf)
    # assert (np.float64(0....float64(0.0)) == (0, inf)
    "test_single_point"
    # assert res0["num_edges"] == res1["num_edges"]
    # assert 2307 == 167
    "test_sparse"
    # assert 38 < 38
    "test_thresh"
    # assert(np.allclose(r1, r2))
    "test_zero_edge_bug"
  ];

  meta = with lib; {
  meta = {
    description = "Lean Persistent Homology Library for Python";
    homepage = "https://ripser.scikit-tda.org";
    changelog = "https://github.com/scikit-tda/ripser.py/blob/${version}/CHANGELOG.md";
    license = licenses.mit;
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}
+28 −18
Original line number Diff line number Diff line
{
  lib,
  bokeh,
  buildPythonPackage,
  colorcet,
  datashader,
  fetchFromGitHub,

  # build-system
  setuptools,
  holoviews,
  matplotlib,

  # dependencies
  numba,
  numpy,
  pandas,
  pynndescent,
  pytestCheckHook,
  scikit-image,
  scikit-learn,
  scipy,
  tqdm,

  # optional-dependencies
  bokeh,
  colorcet,
  dask,
  datashader,
  holoviews,
  matplotlib,
  pandas,
  scikit-image,
  seaborn,
  tensorflow,
  tensorflow-probability,
  tqdm,

  # tests
  pytestCheckHook,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
  pname = "umap-learn";
  version = "0.5.7";
  version = "0.5.8";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "lmcinnes";
    repo = "umap";
    tag = "release-${version}";
    hash = "sha256-hPYmRDSeDa4JWGekUVq3CWf5NthHTpMpyuUQ1yIkVAE=";
    hash = "sha256-VR+qBZyFtpW/xuFXI8pxDkkwJKt9qajnUtvuZLFZtF0=";
  };

  build-system = [ setuptools ];
@@ -49,6 +59,7 @@ buildPythonPackage rec {
    plot = [
      bokeh
      colorcet
      dask
      datashader
      holoviews
      matplotlib
@@ -67,11 +78,10 @@ buildPythonPackage rec {
    all = plot ++ parametric_umap ++ tbb;
  };

  nativeCheckInputs = [ pytestCheckHook ];

  preCheck = ''
    export HOME=$TMPDIR
  '';
  nativeCheckInputs = [
    pytestCheckHook
    writableTmpDirAsHomeHook
  ];

  disabledTests = [
    # Plot functionality requires additional packages.
@@ -88,11 +98,11 @@ buildPythonPackage rec {
    "test_save_load"
  ];

  meta = with lib; {
  meta = {
    description = "Uniform Manifold Approximation and Projection";
    homepage = "https://github.com/lmcinnes/umap";
    changelog = "https://github.com/lmcinnes/umap/releases/tag/release-${version}";
    license = licenses.bsd3;
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}