python3Packages.sympy: build from GitHub sources, cleanup

This commit is contained in:
Gaetan Lepage 2026-05-20 13:05:03 +00:00
commit 4d80938179

View file

@ -1,30 +1,48 @@
{
lib,
buildPythonPackage,
fetchPypi,
glibcLocales,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
mpmath,
# tests
glibcLocales,
# Reverse dependency
sage,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "sympy";
version = "1.14.0";
format = "setuptools";
pyproject = true;
__structuredAttrs = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-09P+jfHloLQvDnvfUFQWl9vn0jdG6JSZDAMOKwXnJRc=";
src = fetchFromGitHub {
owner = "sympy";
repo = "sympy";
tag = "sympy-${finalAttrs.version}";
hash = "sha256-aSMQ/H5agjsa+Lp7o15/irLSTLtmF/VEqMCBGbXbvmM=";
};
nativeCheckInputs = [ glibcLocales ];
build-system = [
setuptools
];
propagatedBuildInputs = [ mpmath ];
pythonRelaxDeps = [
"mpmath"
];
dependencies = [
mpmath
];
# tests take ~1h
doCheck = false;
nativeCheckInputs = [ glibcLocales ];
pythonImportsCheck = [ "sympy" ];
passthru.tests = {
@ -35,8 +53,10 @@ buildPythonPackage rec {
description = "Python library for symbolic mathematics";
mainProgram = "isympy";
homepage = "https://www.sympy.org/";
downloadPage = "https://github.com/sympy/sympy";
changelog = "https://github.com/sympy/sympy/wiki/Release-Notes-for-${finalAttrs.version}";
license = lib.licenses.bsd3;
maintainers = [ ];
teams = [ lib.teams.sage ];
};
}
})