Unverified Commit a6e3f45a authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

python3Packages.pygsl: 2.5.1 -> 2.6.2 (#398400)

parents a2a0fba4 7109465b
Loading
Loading
Loading
Loading
+16 −17
Original line number Diff line number Diff line
@@ -2,42 +2,41 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pkg-config,
  gsl,
  swig,
  meson-python,
  numpy,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pygsl";
  version = "2.5.1";
  format = "setuptools";
  version = "2.6.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pygsl";
    repo = "pygsl";
    tag = "v${version}";
    hash = "sha256-Xgb37uY8CV0gkBZ7Rgg8d5uD+bIBsPfi1ss8PT1LMAY=";
    hash = "sha256-1aAc2qGVlClnsw70D1QqPbSsyij0JNgfIXsLzelYx3E=";
  };

  # error: no member named 'n' in 'gsl_bspline_workspace'
  postPatch = lib.optionalString (lib.versionAtLeast gsl.version "2.8") ''
    substituteInPlace src/bspline/bspline.ic \
      --replace-fail "self->w->n" "self->w->ncontrol"
    substituteInPlace swig_src/bspline_wrap.c \
      --replace-fail "self->w->n;" "self->w->ncontrol;"
  '';

  nativeBuildInputs = [
    gsl.dev
    pkg-config
    swig
  ];
  buildInputs = [ gsl ];
  dependencies = [ numpy ];
  buildInputs = [
    gsl
  ];

  preBuild = ''
    python setup.py build_ext --inplace
  '';
  build-system = [
    meson-python
    numpy
  ];
  dependencies = [
    numpy
  ];

  preCheck = ''
    cd tests