Commit 1d4e4b48 authored by qbisi's avatar qbisi
Browse files

python3Packages.symengine: cleanup

parent 56c70eb5
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
@@ -3,19 +3,17 @@
  buildPythonPackage,
  fetchFromGitHub,
  cython,
  setuptools,
  cmake,
  symengine,
  pytest,
  sympy,
  python,
  setuptools,
}:

buildPythonPackage rec {
  pname = "symengine";
  version = "0.14.1";

  build-system = [ setuptools ];
  pyproject = true;

  src = fetchFromGitHub {
@@ -25,19 +23,24 @@ buildPythonPackage rec {
    hash = "sha256-adzODm7gAqwAf7qzfRQ1AG8mC3auiXM4OsV/0h+ZmUg=";
  };

  env = {
    SymEngine_DIR = "${symengine}";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace-fail "'cython>=0.29.24'" "'cython'"
  '';

  build-system = [
    cython
    setuptools
  ];

  dontUseCmakeConfigure = true;

  nativeBuildInputs = [
    cmake
    cython
  ];

  buildInputs = [
    symengine
  ];

  nativeCheckInputs = [
@@ -47,15 +50,17 @@ buildPythonPackage rec {

  checkPhase = ''
    runHook preCheck

    mkdir empty && cd empty
    ${python.interpreter} ../bin/test_python.py

    runHook postCheck
  '';

  meta = with lib; {
  meta = {
    description = "Python library providing wrappers to SymEngine";
    homepage = "https://github.com/symengine/symengine.py";
    license = licenses.mit;
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}