python.scm
| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
| 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 | |
| 19 | (define-module (more packages python) |
| 20 | #:use-module ((guix licenses) #:prefix license:) |
| 21 | #:use-module (gnu packages) |
| 22 | #:use-module (gnu packages compression) |
| 23 | #:use-module (gnu packages databases) |
| 24 | #:use-module (gnu packages python) |
| 25 | #:use-module (gnu packages tls) |
| 26 | #:use-module (gnu packages zip) |
| 27 | #:use-module (guix packages) |
| 28 | #:use-module (guix download) |
| 29 | #:use-module (guix git-download) |
| 30 | #:use-module (guix utils) |
| 31 | #:use-module (guix build-system python)) |
| 32 | |
| 33 | (define-public python-cooldict |
| 34 | (package |
| 35 | (name "python-cooldict") |
| 36 | (version "1.02") |
| 37 | (source (origin |
| 38 | (method url-fetch) |
| 39 | (uri (pypi-uri "cooldict" version)) |
| 40 | (sha256 |
| 41 | (base32 |
| 42 | "084if0s504576nph0f6glmg3mmvijq7nbnf65hh22gwwdwrjss83")))) |
| 43 | (build-system python-build-system) |
| 44 | (native-inputs |
| 45 | `(("ana" ,python-ana))) |
| 46 | (home-page "https://github.com/zardus/cooldict") |
| 47 | (synopsis "Some useful dict-like structures") |
| 48 | (description "Some useful dict-like structures.") |
| 49 | (license license:bsd-2))) |
| 50 | |
| 51 | (define-public python2-cooldict |
| 52 | (package-with-python2 python-cooldict)) |
| 53 | |
| 54 | (define-public python-cachetools |
| 55 | (package |
| 56 | (name "python-cachetools") |
| 57 | (version "2.0.0") |
| 58 | (source (origin |
| 59 | (method url-fetch) |
| 60 | (uri (pypi-uri "cachetools" version)) |
| 61 | (sha256 |
| 62 | (base32 |
| 63 | "0a56ydsvsri1r19ny55g0x7jsgjl9n02vnxbhfz0vhhd4h174nki")))) |
| 64 | (build-system python-build-system) |
| 65 | (home-page "https://github.com/tkem/cachetools") |
| 66 | (synopsis "Memoizing collections and decorators including lru_cache") |
| 67 | (description "This module provides various memoizing collections and |
| 68 | decorators, including variants of the Python 3 Standard Library @code{lru_cache} |
| 69 | function decorator.") |
| 70 | (license license:expat))) |
| 71 | |
| 72 | (define-public python2-cachetools |
| 73 | (package-with-python2 python-cachetools)) |
| 74 | |
| 75 | (define-public python-bintrees |
| 76 | (package |
| 77 | (name "python-bintrees") |
| 78 | (version "2.0.7") |
| 79 | (source (origin |
| 80 | (method url-fetch) |
| 81 | (uri (pypi-uri "bintrees" version ".zip")) |
| 82 | (sha256 |
| 83 | (base32 |
| 84 | "0w0js514awl9qwamcr71spi8mmv7q3n4mgrqrnmr9w6f09k5wrv0")))) |
| 85 | (build-system python-build-system) |
| 86 | (native-inputs `(("unzip" ,unzip))) |
| 87 | (home-page "https://github.com/mozman/bintrees") |
| 88 | (synopsis "Provides Binary- RedBlack- and AVL-Trees written in Python and Cython/C") |
| 89 | (description "This package provides Binary- RedBlack- and AVL-Trees written |
| 90 | in Python and Cython/C. |
| 91 | |
| 92 | This Classes are much slower than the built-in dict class, but all |
| 93 | iterators/generators yielding data in sorted key order. Trees can be uses as |
| 94 | drop in replacement for dicts in most cases.") |
| 95 | (license license:expat))) |
| 96 | |
| 97 | (define-public python2-bintrees |
| 98 | (package-with-python2 python-bintrees)) |
| 99 | |
| 100 | (define-public python2-dpkt |
| 101 | (package |
| 102 | (name "python2-dpkt") |
| 103 | (version "1.9.1") |
| 104 | (source (origin |
| 105 | (method url-fetch) |
| 106 | (uri (pypi-uri "dpkt" version)) |
| 107 | (sha256 |
| 108 | (base32 |
| 109 | "0rr9ygczhxkfb61778jx0cxs0sq46zwlcj5l3wn6xmd3iy3yx9y6")) |
| 110 | (modules '((guix build utils))) |
| 111 | (snippet |
| 112 | '(substitute* "setup.py" |
| 113 | (("os.system\\('py2dsc-deb ' + sdist_file\\)") ""))))) |
| 114 | (build-system python-build-system) |
| 115 | (arguments |
| 116 | `(#:python ,python-2)) |
| 117 | (home-page "https://github.com/kbandla/dpkt") |
| 118 | (synopsis "Fast, simple network packet creation / parsing") |
| 119 | (description "Fast, simple packet creation / parsing, with definitions for |
| 120 | the basic TCP/IP protocols.") |
| 121 | (license license:bsd-3))) |
| 122 | |
| 123 | (define-public python2-rpyc |
| 124 | (package |
| 125 | (name "python2-rpyc") |
| 126 | (version "3.3.0") |
| 127 | (source (origin |
| 128 | (method url-fetch) |
| 129 | (uri (pypi-uri "rpyc" version)) |
| 130 | (sha256 |
| 131 | (base32 |
| 132 | "0jwbxxf5f8l05pwh7ilg380y4pqv3nxibaszbwpl9gzh2i9q9yj3")))) |
| 133 | (build-system python-build-system) |
| 134 | (native-inputs |
| 135 | `(("nose" ,python2-nose))) |
| 136 | (propagated-inputs |
| 137 | `(("plumbum" ,python2-plumbum) |
| 138 | ("progressbar" ,python2-progressbar))) |
| 139 | (arguments |
| 140 | `(#:python ,python-2)) |
| 141 | (home-page "https://github.com/tomerfiliba/rpyc") |
| 142 | (synopsis "Remote procedure call for Python") |
| 143 | (description "Remote Python Call is a transparent library for symmetrical |
| 144 | remote procedure calls, clustering, and distributed-computing. RPyC makes use |
| 145 | of object-proxying, a technique that employs python's dynamic nature, to |
| 146 | overcome the physical boundaries between processes and computers, so that |
| 147 | remote objects can be manipulated as if they were local.") |
| 148 | (license license:expat))) |
| 149 | |
| 150 | (define-public python2-progressbar |
| 151 | (package |
| 152 | (name "python2-progressbar") |
| 153 | (version "2.3") |
| 154 | (source (origin |
| 155 | (method url-fetch) |
| 156 | (uri (pypi-uri "progressbar" version)) |
| 157 | (sha256 |
| 158 | (base32 |
| 159 | "0m0j93yfvbd8pw8cz2vdb9hyk9d0zkkd509k69jrw545jxr8mlxj")))) |
| 160 | (build-system python-build-system) |
| 161 | (arguments |
| 162 | `(#:python ,python-2)) |
| 163 | (home-page "https://github.com/niltonvolpato/python-progressbar") |
| 164 | (synopsis "Text progress bar library for Python") |
| 165 | (description |
| 166 | "A text progress bar is typically used to display the progress of a long |
| 167 | running operation, providing a visual cue that processing is underway. |
| 168 | |
| 169 | The ProgressBar class manages the current progress, and the format of the line |
| 170 | is given by a number of widgets. A widget is an object that may display |
| 171 | differently depending on the state of the progress bar. There are three types |
| 172 | of widgets: |
| 173 | |
| 174 | @enumerate |
| 175 | @item a string, which always shows itself |
| 176 | @item a ProgressBarWidget, which may return a different value every time its |
| 177 | update method is called |
| 178 | @item a ProgressBarWidgetHFill, which is like ProgressBarWidget, except it |
| 179 | expands to fill the remaining width of the line. |
| 180 | @end enumerate |
| 181 | |
| 182 | The progressbar module is very easy to use, yet very powerful. It will also |
| 183 | automatically enable features like auto-resizing when the system supports it.") |
| 184 | (license (list license:lgpl2.1+ license:bsd-3)))) |
| 185 | |
| 186 | (define-public python-progressbar2 |
| 187 | (package |
| 188 | (name "python-progressbar2") |
| 189 | (version "3.20.0") |
| 190 | (source (origin |
| 191 | (method url-fetch) |
| 192 | (uri (pypi-uri "progressbar2" version)) |
| 193 | (sha256 |
| 194 | (base32 |
| 195 | "1xz5l3598bl2r1j8h6dqljbjf44f2d137ppi0l381adz4zd38vd1")))) |
| 196 | (build-system python-build-system) |
| 197 | (native-inputs |
| 198 | `(("pytest-runner" ,python-pytest-runner) |
| 199 | ("pytest" ,python-pytest))) |
| 200 | (propagated-inputs |
| 201 | `(("six" ,python-six) |
| 202 | ("utils" ,python-utils))) |
| 203 | (home-page "https://github.com/WoLpH/python-progressbar") |
| 204 | (synopsis "A text progress bar for python") |
| 205 | (description "A text progress bar is typically used to display the progress |
| 206 | of a long running operation, providing a visual cue that processing is underway. |
| 207 | |
| 208 | The ProgressBar class manages the current progress, and the format of the line |
| 209 | is given by a number of widgets. A widget is an object that may display |
| 210 | differently depending on the state of the progress bar.") |
| 211 | (license license:bsd-2))) |
| 212 | |
| 213 | (define-public python2-progressbar2 |
| 214 | (package-with-python2 python-progressbar2)) |
| 215 | |
| 216 | (define-public python-mulpyplexer |
| 217 | (package |
| 218 | (name "python-mulpyplexer") |
| 219 | (version "0.07") |
| 220 | (source (origin |
| 221 | (method url-fetch) |
| 222 | (uri (pypi-uri "mulpyplexer" version)) |
| 223 | (sha256 |
| 224 | (base32 |
| 225 | "1j5gm913adc8f0mn9y6a9wm9h78jb7ykr8i00yysfcy6ah2ilp9v")))) |
| 226 | (build-system python-build-system) |
| 227 | (home-page "https://github.com/zardus/mulpyplexer") |
| 228 | (synopsis "Multiplex interactions with lists of python objects") |
| 229 | (description "Mulpyplexer is a piece of code that can multiplex interactions with lists of python objects.") |
| 230 | (license license:bsd-2))) |
| 231 | |
| 232 | (define-public python2-mulpyplexer |
| 233 | (package-with-python2 python-mulpyplexer)) |
| 234 | |
| 235 | (define-public python-ana |
| 236 | (package |
| 237 | (name "python-ana") |
| 238 | (version "0") |
| 239 | (source (origin |
| 240 | (method git-fetch) |
| 241 | (uri (git-reference |
| 242 | (url "https://github.com/zardus/ana.git") |
| 243 | (commit "94928f773661eaa5a6c2dec40dad199c70daedab"))) |
| 244 | (sha256 |
| 245 | (base32 |
| 246 | "0f2wdhs0xwpnk9lznxl96b2yzcz1641wbqrh1aid7q2pm60v6dhv")) |
| 247 | (file-name (string-append name "-" version)))) |
| 248 | (build-system python-build-system) |
| 249 | (native-inputs |
| 250 | `(("nose" ,python-nose))) |
| 251 | (arguments |
| 252 | `(#:phases |
| 253 | (modify-phases %standard-phases |
| 254 | (add-before 'build 'fix-python3-import |
| 255 | (lambda _ |
| 256 | (substitute* "ana/datalayer.py" |
| 257 | (("import cPickle as pickle") "import pickle"))))))) |
| 258 | (home-page "https://github.com/zardus/ana") |
| 259 | (synopsis "Provide easy distributed data storage for python objects") |
| 260 | (description "ANA is a project to provide easy distributed data storage for |
| 261 | stuff. It provides every object with a UUID and, when pickled, will first |
| 262 | serialize the object's state to a central location and then \"pickle\" the |
| 263 | object into just its UUID. This is really handy when you have to distribute |
| 264 | objects in some distributed system, and you'd rather not pickle the whole |
| 265 | object every time you need to send it.") |
| 266 | (license license:bsd-2))) |
| 267 | |
| 268 | (define-public python2-ana |
| 269 | (package |
| 270 | (inherit (package-with-python2 python-ana)) |
| 271 | (arguments |
| 272 | `(#:python ,python-2)))) |
| 273 | |
| 274 | (define-public python-plumbum |
| 275 | (package |
| 276 | (name "python-plumbum") |
| 277 | (version "1.6.3") |
| 278 | (source |
| 279 | (origin |
| 280 | (method url-fetch) |
| 281 | (uri (pypi-uri "plumbum" version)) |
| 282 | (sha256 |
| 283 | (base32 "083kikr1f7qzpp5jllss97dy8d6249v7ia3wg9i0a6wz8l4ffj82")))) |
| 284 | (build-system python-build-system) |
| 285 | (native-inputs |
| 286 | `(("pytest" ,python-pytest))) |
| 287 | (home-page "https://plumbum.readthedocs.io/en/latest") |
| 288 | (synopsis "Shell script-like programs in Python") |
| 289 | (description |
| 290 | "Plumbum (Latin for lead, which was used to create pipes back in the day) |
| 291 | is a small yet feature-rich library for shell script-like programs in Python. |
| 292 | The motto of the library is “Never write shell scripts again”, and thus it |
| 293 | attempts to mimic the shell syntax (“shell combinators”) where it makes sense, |
| 294 | while keeping it all Pythonic and cross-platform.") |
| 295 | (license license:expat))) |
| 296 | |
| 297 | (define-public python2-plumbum |
| 298 | (package-with-python2 python-plumbum)) |
| 299 |