Skip to content

Commit

Permalink
python3Packages.symengine: fix build with setuptools 61
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt committed Apr 16, 2022
1 parent e19bb47 commit 081f27f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkgs/development/python-modules/symengine/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib
, buildPythonPackage
, fetchpatch
, fetchFromGitHub
, cython
, cmake
Expand All @@ -12,6 +13,7 @@
buildPythonPackage rec {
pname = "symengine";
version = "0.9.2";
format = "setuptools";

src = fetchFromGitHub {
owner = "symengine";
Expand All @@ -20,13 +22,18 @@ buildPythonPackage rec {
sha256 = "sha256-ZHplYEG97foy/unOdSokFFkDl4LK5TI4kypHSLpcCM4=";
};

patches = [
(fetchpatch {
# setuptools 61 compat
url = "https://github.com/symengine/symengine.py/commit/987e665e71cf92d1b021d7d573a1b9733408eecf.patch";
hash = "sha256-2QbNdw/lKYRIRpOU5BiwF2kK+5Lh2j/Q82MKUIvl0+c=";
})
];

postConfigure = ''
substituteInPlace setup.py \
--replace "\"cmake\"" "\"${cmake}/bin/cmake\"" \
--replace "'cython>=0.29.24'" "'cython'"
substituteInPlace cmake/FindCython.cmake \
--replace "SET(CYTHON_BIN cython" "SET(CYTHON_BIN ${cython}/bin/cython"
'';

nativeBuildUnputs = [ cmake ];
Expand Down

0 comments on commit 081f27f

Please sign in to comment.