Unverified Commit 4a9f452e authored by natsukium's avatar natsukium
Browse files

python312Packages.sasmodels: refactor inputs

parent 7d1fd250
Loading
Loading
Loading
Loading
+20 −11
Original line number Diff line number Diff line
@@ -3,13 +3,15 @@
  fetchFromGitHub,
  buildPythonPackage,
  setuptools,
  pytest,
  pytestCheckHook,
  numpy,
  scipy,
  matplotlib,
  bumps,
  docutils,
  pyopencl,
  matplotlib,
  opencl-headers,
  pycuda,
  pyopencl,
  pythonOlder,
}:

@@ -32,19 +34,26 @@ buildPythonPackage rec {
  buildInputs = [ opencl-headers ];

  dependencies = [
    docutils
    matplotlib
    numpy
    scipy
    pyopencl
  ];

  # Note: the 1.0.5 release should be compatible with pytest6, so this can
  # be set back to 'pytest' at that point
  nativeCheckInputs = [ pytest ];
  optional-dependencies = {
    full = [
      docutils
      bumps
      matplotlib
      # columnize
    ];
    server = [ bumps ];
    opencl = [ pyopencl ];
    cuda = [ pycuda ];
  };

  nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.full;

  checkPhase = ''
    HOME=$(mktemp -d) py.test -c ./pytest.ini
  preCheck = ''
    export HOME=$TMPDIR
  '';

  pythonImportsCheck = [ "sasmodels" ];