PageRenderTime 51ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/gnu/packages/python-build.scm

https://gitlab.com/daym/guix
Scheme | 160 lines | 117 code | 8 blank | 35 comment | 5 complexity | 62d09700e8538f83af175b38d60538c9 MD5 | raw file
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015, 2020 Efraim Flashner <efraim@flashner.co.il>
  3. ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
  4. ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
  5. ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
  6. ;;; Copyright © 2018, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  7. ;;;
  8. ;;; This file is part of GNU Guix.
  9. ;;;
  10. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  11. ;;; under the terms of the GNU General Public License as published by
  12. ;;; the Free Software Foundation; either version 3 of the License, or (at
  13. ;;; your option) any later version.
  14. ;;;
  15. ;;; GNU Guix is distributed in the hope that it will be useful, but
  16. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. ;;; GNU General Public License for more details.
  19. ;;;
  20. ;;; You should have received a copy of the GNU General Public License
  21. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  22. (define-module (gnu packages python-build)
  23. #:use-module ((guix licenses) #:prefix license:)
  24. #:use-module (guix build-system python)
  25. #:use-module (guix download)
  26. #:use-module (guix packages))
  27. ;;; Commentary:
  28. ;;;
  29. ;;; Python packages to build... Python packages. Since they are bound to be
  30. ;;; relied on by many, their dependencies should be kept minimal, and this
  31. ;;; module should not depend on other modules containing Python packages.
  32. ;;;
  33. ;;; Code:
  34. (define-public python-wheel
  35. (package
  36. (name "python-wheel")
  37. (version "0.36.2")
  38. (source
  39. (origin
  40. (method url-fetch)
  41. (uri (pypi-uri "wheel" version))
  42. (sha256
  43. (base32
  44. "0pi4w0brz7a86ddk6pm8p6j0w6d7jgacgxm0c2dab3k5cb8yy7p1"))))
  45. (build-system python-build-system)
  46. (arguments
  47. ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
  48. ;; fails to find the newly-built bdist_wheel library, even though it is
  49. ;; available on PYTHONPATH. What search path is consulted by setup.py?
  50. '(#:tests? #f))
  51. (home-page "https://bitbucket.org/pypa/wheel/")
  52. (synopsis "Format for built Python packages")
  53. (description
  54. "A wheel is a ZIP-format archive with a specially formatted filename and
  55. the @code{.whl} extension. It is designed to contain all the files for a PEP
  56. 376 compatible install in a way that is very close to the on-disk format. Many
  57. packages will be properly installed with only the @code{Unpack} step and the
  58. unpacked archive preserves enough information to @code{Spread} (copy data and
  59. scripts to their final locations) at any later time. Wheel files can be
  60. installed with a newer @code{pip} or with wheel's own command line utility.")
  61. (license license:expat)))
  62. (define-public python2-wheel
  63. (package-with-python2 python-wheel))
  64. ;;; XXX: Not really at home, but this seems the best place to prevent circular
  65. ;;; module dependencies.
  66. (define-public python-toml
  67. (package
  68. (name "python-toml")
  69. (version "0.10.1")
  70. (source
  71. (origin
  72. (method url-fetch)
  73. (uri (pypi-uri "toml" version))
  74. (sha256
  75. (base32
  76. "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
  77. (build-system python-build-system)
  78. (arguments
  79. `(#:tests? #f)) ;no tests suite in release
  80. (home-page "https://github.com/uiri/toml")
  81. (synopsis "Library for TOML")
  82. (description
  83. "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
  84. Language (TOML) configuration files.")
  85. (license license:expat)))
  86. (define-public python-pep517-bootstrap
  87. (hidden-package
  88. (package
  89. (name "python-pep517-bootstrap")
  90. (version "0.9.1")
  91. (source
  92. (origin
  93. (method url-fetch)
  94. (uri (pypi-uri "pep517" version))
  95. (sha256
  96. (base32
  97. "0zqidxah03qpnp6zkg3zd1kmd5f79hhdsfmlc0cldaniy80qddxf"))))
  98. (build-system python-build-system)
  99. (arguments
  100. `(#:tests? #f)) ;to avoid circular dependencies
  101. (propagated-inputs
  102. `(("python-toml" ,python-toml)
  103. ("python-wheel" ,python-wheel)))
  104. (home-page "https://github.com/pypa/pep517")
  105. (synopsis "Wrappers to build Python packages using PEP 517 hooks")
  106. (description
  107. "Wrappers to build Python packages using PEP 517 hooks.")
  108. (license license:expat))))
  109. ;;; The name 'python-pypa-build' is chosen rather than 'python-build' to avoid
  110. ;;; a name clash with python-build from (guix build-system python).
  111. (define-public python-pypa-build
  112. (package
  113. (name "python-pypa-build")
  114. (version "0.1.0")
  115. (source (origin
  116. (method url-fetch)
  117. (uri (pypi-uri "build" version))
  118. (sha256
  119. (base32
  120. "1d6m21lijwm04g50nwgsgj7x3vhblzw7jv05ah8psqgzk20bbch8"))))
  121. (build-system python-build-system)
  122. (arguments
  123. `(#:tests? #f)) ;to tests in the PyPI release
  124. (propagated-inputs
  125. `(("python-pep517", python-pep517-bootstrap)
  126. ("python-toml" ,python-toml)))
  127. (home-page "https://pypa-build.readthedocs.io/en/latest/")
  128. (synopsis "Simple Python PEP 517 package builder")
  129. (description "The @command{build} command invokes the PEP 517 hooks to
  130. build a distribution package. It is a simple build tool and does not perform
  131. any dependency management. It aims to keep dependencies to a minimum, in
  132. order to make bootstrapping easier.")
  133. (license license:expat)))
  134. (define-public python-poetry-core
  135. (package
  136. (name "python-poetry-core")
  137. (version "1.0.0")
  138. (source
  139. (origin
  140. (method url-fetch)
  141. (uri (pypi-uri "poetry-core" version))
  142. (sha256
  143. (base32 "1mgv276h1iphn5fqhp2sgkgd5d0c39hs33vgaf157x5ri7rlyrka"))))
  144. (build-system python-build-system)
  145. (home-page "https://github.com/python-poetry/poetry-core")
  146. (synopsis "Poetry PEP 517 build back-end")
  147. (description
  148. "The @code{poetry-core} module provides a PEP 517 build back-end
  149. implementation developed for Poetry. This project is intended to be
  150. a light weight, fully compliant, self-contained package allowing PEP 517
  151. compatible build front-ends to build Poetry managed projects.")
  152. (license license:expat)))