mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
python3Packages.cypari: init at 2.5.5
This commit is contained in:
parent
f98c76b988
commit
6f28c8729e
2 changed files with 82 additions and 0 deletions
80
pkgs/development/python-modules/cypari/default.nix
Normal file
80
pkgs/development/python-modules/cypari/default.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
lib,
|
||||
python,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
setuptools,
|
||||
cython,
|
||||
bash,
|
||||
perl,
|
||||
gnum4,
|
||||
texliveBasic,
|
||||
}:
|
||||
|
||||
let
|
||||
pariVersion = "2.15.4";
|
||||
gmpVersion = "6.3.0";
|
||||
|
||||
pariSrc = fetchurl {
|
||||
url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor pariVersion}/pari-${pariVersion}.tar.gz";
|
||||
hash = "sha256-w1Rb/uDG37QLd/tLurr5mdguYAabn20ovLbPAEyMXA8=";
|
||||
};
|
||||
|
||||
gmpSrc = fetchurl {
|
||||
url = "https://ftp.gnu.org/gnu/gmp/gmp-${gmpVersion}.tar.bz2";
|
||||
hash = "sha256-rCghGnz7YJuuLiyNYFjWbI/pZDT3QM9v4uR7AA0cIMs=";
|
||||
};
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "cypari";
|
||||
version = "2.5.5";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "3-manifolds";
|
||||
repo = "CyPari";
|
||||
tag = "${version}_as_released";
|
||||
hash = "sha256-RJ9O1KsDHmMkTCIFUrcSUkA5ijTsxmoI939QCsCib0Y=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./setup.py \
|
||||
--replace-fail "/bin/bash" "${lib.getExe bash}"
|
||||
# final character is stripped from PARI error messages for some reason
|
||||
substituteInPlace ./cypari/handle_error.pyx \
|
||||
--replace-fail "not a function in function call" "not a function in function cal"
|
||||
ln -s ${pariSrc} ${pariSrc.name}
|
||||
ln -s ${gmpSrc} ${gmpSrc.name}
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
cython
|
||||
];
|
||||
|
||||
NIX_LDFLAGS = "-lc";
|
||||
|
||||
nativeBuildInputs = [
|
||||
gnum4
|
||||
perl
|
||||
texliveBasic
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "cypari" ];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
rm -r cypari
|
||||
${python.interpreter} -m cypari.test
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Sage's PARI extension, modified to stand alone";
|
||||
homepage = "https://github.com/3-manifolds/CyPari";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [ noiioiu ];
|
||||
changelog = "https://github.com/3-manifolds/CyPari/releases/tag/${src.tag}";
|
||||
};
|
||||
}
|
|
@ -3128,6 +3128,8 @@ self: super: with self; {
|
|||
|
||||
cynthion = callPackage ../development/python-modules/cynthion { };
|
||||
|
||||
cypari = callPackage ../development/python-modules/cypari { };
|
||||
|
||||
cypari2 = callPackage ../development/python-modules/cypari2 { };
|
||||
|
||||
cypherpunkpay = callPackage ../development/python-modules/cypherpunkpay { };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue