summaryrefslogtreecommitdiff
path: root/wigust/packages/python.scm
blob: a23fdb626576b66381e075578316d50a8f016adc (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (wigust packages python)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages)
  #:use-module (gnu packages algebra)
  #:use-module (gnu packages adns)
  #:use-module (gnu packages attr)
  #:use-module (gnu packages backup)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages crypto)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages django)
  #:use-module (gnu packages file)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages ghostscript)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages graphviz)
  #:use-module (gnu packages gstreamer)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages icu4c)
  #:use-module (gnu packages image)
  #:use-module (gnu packages imagemagick)
  #:use-module (gnu packages libevent)
  #:use-module (gnu packages libffi)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages man)
  #:use-module (gnu packages maths)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages networking)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages openstack)
  #:use-module (gnu packages password-utils)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages protobuf)
  #:use-module (gnu packages qt)
  #:use-module (gnu packages readline)
  #:use-module (gnu packages sdl)
  #:use-module (gnu packages search)
  #:use-module (gnu packages shells)
  #:use-module (gnu packages ssh)
  #:use-module (gnu packages statistics)
  #:use-module (gnu packages tex)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages video)
  #:use-module (gnu packages web)
  #:use-module (gnu packages base)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages tcl)
  #:use-module (gnu packages bdw-gc)
  #:use-module (gnu packages python)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system python)
  #:use-module (guix build-system trivial)
  #:use-module (srfi srfi-1))

(define-public python-ranger-fm
  (package
    (name "python-ranger-fm")
    (version "1.9.0b5")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "ranger-fm" version))
       (sha256
        (base32
         "0iqghgyhrn27pfyl63mn6g8lkd3768mqk6gn8gfg2hysfd1p8gfw"))))
    (build-system python-build-system)
    (home-page "http://ranger.nongnu.org")
    (synopsis "Vim-like file manager")
    (description "Vim-like file manager")
    (license #f)))

(define-public python-github
  (let ((commit "c82e90e5bd65eaadeabbdbbbe37bc7e3dc295b3e")
        (revision "1"))
    (package
      (name "python-github")
      (version (string-append "1.0.0a4" revision "."
                              (string-take commit 7)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/sigmavirus24/github3.py.git")
                      (commit commit)))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
                  "17vfzjshr5p567x28zvilcsy0n814hcx4wjiz185n7p44sgc577r"))))
      (build-system python-build-system)
      (propagated-inputs
       `(("python-ndg-httpsclient" ,python-ndg-httpsclient)
         ("python-pyasn1" ,python-pyasn1)
         ("python-pyopenssl" ,python-pyopenssl)
         ("python-betamax-matchers" ,python-betamax-matchers)
         ("python-mock" ,python-mock)
         ("python-pytest" ,python-pytest)
         ("python-uritemplate" ,python-uritemplate)))
      (home-page "https://github3py.readthedocs.org")
      (synopsis "Python wrapper for the GitHub API")
      (description "Python wrapper for the GitHub API
@url{http://developer.github.com/v3}.")
      (license license:bsd-3))))

(define-public python2-github
  (let ((base (package-with-python2
               (strip-python2-variant python-github))))
    (package
      (inherit base)
      (propagated-inputs
       `(("python2-unittest2" ,python2-unittest2)
         ,@(package-propagated-inputs base))))))

(define-public python-livereload
  (package
    (name "python-livereload")
    (version "2.5.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "livereload" version))
       (sha256
        (base32
         "0b2yyfnpddmrwjfqsndidzchkf3l9jlgzfkwl8dplim9gq6y2ba2"))))
    (build-system python-build-system)
    (propagated-inputs
     `(("python-six" ,python-six)
       ("python-tornado" ,python-tornado)))
    (home-page "https://github.com/lepture/python-livereload")
    (synopsis "Python LiveReload is an awesome tool for web developers")
    (description "Python LiveReload is an awesome tool for web developers")
    (license license:bsd-3)))

(define-public python-starred
  (let ((commit "aa4c010c791a4f84f6e26f96685552ef2ef3a4e8")
        (revision "1"))
    (package
      (name "python-starred")
      (version (string-append "1.3.1" revision "."
                              (string-take commit 7)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/maguowei/starred.git")
                      (commit commit)))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
                  "181jr5r4m1dkb081jynlkdmy8cd55673vl8lwzb34q6diqds844a"))))
      (build-system python-build-system)
      (propagated-inputs
       `(("python-click" ,python-click)
         ("python-github" ,python-github)))
      (home-page "https://github.com/maguowei/starred")
      (synopsis "Awesome List used GitHub stars")
      (description "Awesome List used GitHub stars.")
      (license license:expat))))

(define-public python2-starred
  (let ((base (package-with-python2
               (strip-python2-variant python-starred))))
    (package
      (inherit base)
      (propagated-inputs
       `(("python2-github2", python2-github)
         ,@(alist-delete "python-github"
                         (package-propagated-inputs base)
                         equal?))))))

(define-public python-pytz-2016-10
  (package
    (inherit python-pytz)
    (version "2016.10")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pytz" version ".zip"))
       (sha256
        (base32
         "05qrqh9iy20ilah6pam2khzb9lq3d6r9glfp97nigqjzjxkg1yxa"))))))

(define-public python-gitsome
  (package
    (name "python-gitsome")
    (version "0.7.2")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "gitsome" version))
       (sha256
        (base32
         "0q1rnbfbvkwv39qzjnisk8l8fl46m25pvp7gv1lc0j0g28hg9ln4"))))
    (build-system python-build-system)
    (inputs
     `(("python-ply" ,python-ply)
       ("python-uritemplate" ,python-uritemplate)
       ("python-docopt" ,python-docopt)
       ("python-pytz" ,python-pytz-2016-10)
       ("python-feedparser" ,python-feedparser)
       ("python-pygments" ,python-pygments)
       ("python-click" ,python-click)
       ("python-colorama" ,python-colorama)
       ("python-requests" ,python-requests)
       ("python-prompt-toolkit" ,python-prompt-toolkit)
       ("python-numpydoc" ,python-numpydoc)
       ("python-mock" ,python-mock)))
    (arguments
     `(#:tests? #f
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'bootstrap
           (lambda _ (substitute* '("setup.py" "gitsome.egg-info/requires.txt")
                  (("uritemplate.py") "uritemplate"))))
         (add-before 'check 'pre-check (lambda _ (setenv "HOME" (getcwd)) #t)))))
    (home-page "https://github.com/donnemartin/gitsome")
    (synopsis "A Supercharged Git/Shell Autocompleter with GitHub
Integration")
    (description "A Supercharged Git/Shell Autocompleter with GitHub Integration.")
    (license license:gpl3+)))

(define-public python-hosts
  (let ((commit "b42c9ea692ab36a96fb0f2804a7440eca406e36c")
        (revision "1"))
    (package
      (name "python-hosts")
      (version "0.1.0")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/StevenBlack/hosts.git")
                      (commit commit)))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
                  "04hanv6cwp23wvaz1hd1niz2wk2vrr3z0nsa9wiqp5fpxch5rmiz"))))
      (build-system trivial-build-system)
      (inputs `(("python" ,python)))
      (arguments
       `(#:modules ((guix build utils))
         #:builder
         (begin
           (use-modules (guix build utils))
           (let ((bin         (string-append %output "/bin"))
                 (share-hosts (string-append %output "/share/hosts")))
             (copy-recursively (assoc-ref %build-inputs "source") ".")
             (let ((python-files (find-files "." "\\.py"))
                   (wrapper      (string-append bin "/updateHostsFile")))
               ;; Patch Python shebangs
               (substitute* python-files
                 (("/usr/bin/env python")
                  (string-append (assoc-ref %build-inputs "python")
                                 "/bin/python3"))
                 (("/etc/hosts") "/tmp/hosts"))
               ;; Install
               (copy-recursively "data" (string-append share-hosts "/data"))
               (for-each (lambda (file) (install-file file share-hosts))
                         python-files)
               ;; Wrapper
               (mkdir-p bin)
               (with-output-to-file wrapper
                 (lambda ()
                   (display
                    (string-join `("#!/bin/sh"
                                   ,(string-join `("cd" ,share-hosts))
                                   ,(string-join '("exec"
                                                   "-a" "updateHostsFile"
                                                   "./updateHostsFile.py"
                                                   "\"$@\"")))
                                 "\n"))))
               (for-each (lambda (file) (chmod file #o555))
                         (append (list wrapper)
                                 (find-files share-hosts "\\.py")))))
           #t)))
      (home-page "https://github.com/StevenBlack/hosts.git")
      (synopsis "Extending @code{hosts} file from several sources")
      (description "Extending @code{hosts} file from several sources")
      (license license:expat))))