sagemath.scm 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages sagemath)
  19. #:use-module ((guix licenses) #:prefix license:)
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix build-system python)
  23. #:use-module (gnu packages algebra)
  24. #:use-module (gnu packages compression)
  25. #:use-module (gnu packages multiprecision)
  26. #:use-module (gnu packages python)
  27. #:use-module (gnu packages python-xyz))
  28. (define-public python-cypari2
  29. (package
  30. (name "python-cypari2")
  31. (version "2.0.3")
  32. (source
  33. (origin
  34. (method url-fetch)
  35. (uri (pypi-uri "cypari2" version))
  36. (sha256
  37. (base32
  38. "0mghbmilmy34xp1d50xdx76sijqxmpkm2bcgx2v1mdji2ff7n0yc"))))
  39. (build-system python-build-system)
  40. (native-inputs
  41. `(("python-cython" ,python-cython)))
  42. (propagated-inputs
  43. `(("python-cysignals" ,python-cysignals)))
  44. (inputs
  45. `(("gmp" ,gmp)
  46. ("pari-gp", pari-gp)))
  47. (home-page "https://cypari2.readthedocs.io/")
  48. (synopsis
  49. "Python interface to the number theory library libpari")
  50. (description
  51. "Cypari2 provides a Python interface to the number theory library
  52. PARI/GP. It has been spun off from the SageMath mathematics software system,
  53. but it can be used independently.")
  54. (license license:gpl2+)))
  55. (define-public python2-cypari2
  56. (package-with-python2 python-cypari2))
  57. ;; The stable version of the following package is not young enough to be
  58. ;; used with Sage, since it does not support cython. One would need to
  59. ;; use an alpha release. On the other hand, Sage can be built without it.
  60. (define-public python-gmpy2
  61. (package
  62. (name "python-gmpy2")
  63. (version "2.0.8")
  64. (source (origin
  65. (method url-fetch)
  66. (uri (pypi-uri "gmpy2" version ".zip"))
  67. (sha256
  68. (base32
  69. "0grx6zmi99iaslm07w6c2aqpnmbkgrxcqjrqpfq223xri0r3w8yx"))))
  70. (build-system python-build-system)
  71. (native-inputs
  72. `(("unzip" ,unzip)))
  73. (inputs
  74. `(("gmp" ,gmp)
  75. ("mpfr" ,mpfr)
  76. ("mpc" ,mpc)))
  77. (home-page "https://github.com/aleaxit/gmpy")
  78. (synopsis
  79. "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x")
  80. (description
  81. "This package provides a Python interface to the GNU multiprecision
  82. libraries GMO, MPFR and MPC.")
  83. (license license:lgpl3+)))
  84. (define-public python2-gmpy2
  85. (package-with-python2 python-gmpy2))