1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
4 ;;; This file is part of GNU Guix.
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.
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.
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/>.
19 (define-module (gnu packages wireservice)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix build-system python)
22 #:use-module (guix git-download)
23 #:use-module (guix packages)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages check)
26 #:use-module (gnu packages databases)
27 #:use-module (gnu packages python-web)
28 #:use-module (gnu packages python-xyz)
29 #:use-module (gnu packages sphinx)
30 #:use-module (gnu packages time))
32 ;; Base package definition for packages from https://github.com/wireservice.
33 ;; This is done so we can share how to run tests and build documentation.
42 (build-system python-build-system)
44 `(("python-nose" ,python-nose)
45 ("python-sphinx" ,python-sphinx)
46 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
49 (modify-phases %standard-phases
52 (invoke "nosetests" "tests")))
53 (add-after 'install 'install-docs
54 (lambda* (#:key outputs #:allow-other-keys)
55 (let* ((out (assoc-ref outputs "out"))
56 (doc (string-append out "/share/doc/"
57 ,(package-name this-package)
59 ,(package-version this-package))))
60 (with-directory-excursion "docs"
63 (invoke "make" target)
64 (copy-recursively (string-append "_build/" target)
65 (string-append doc "/" target)))
66 '("html" "dirhtml" "singlehtml" "text")))
68 (license license:expat)))
70 (define-public python-leather
72 (inherit base-package)
73 (name "python-leather")
78 (url "https://github.com/wireservice/leather.git")
80 (file-name (git-file-name name version))
83 "1ck3dplni99sv4s117cbm07ydwwjsrxkhdy19rnk0iglia1d4s5i"))))
85 `(("python-cssselect" ,python-cssselect)
86 ("python-lxml" ,python-lxml)
87 ,@(package-native-inputs base-package)))
89 `(("python-six" ,python-six)))
90 (home-page "https://leather.rtfd.org")
91 (synopsis "Python charting for 80% of humans")
92 (description "Leather is a Python charting library for those who need
93 charts now and don't care if they're perfect.")))
95 (define-public python-agate
97 (inherit base-package)
103 (url "https://github.com/wireservice/agate.git")
105 (file-name (git-file-name name version))
108 "077zj8xad8hsa3nqywvf7ircirmx3krxdipl8wr3dynv3l3khcpl"))))
110 `(("python-cssselect" ,python-cssselect)
111 ("python-lxml" ,python-lxml)
112 ,@(package-native-inputs base-package)))
114 `(("python-babel" ,python-babel)
115 ("python-isodate" ,python-isodate)
116 ("python-leather" ,python-leather)
117 ("python-parsedatetime" ,python-parsedatetime)
118 ("python-pytimeparse" ,python-pytimeparse)
119 ("python-six" ,python-six)
120 ("python-slugify" ,python-slugify)))
121 (home-page "https://agate.rtfd.org")
122 (synopsis "Data analysis library")
123 (description "Agate is a Python data analysis library. It is an
124 alternative to numpy and pandas that solves real-world problems with readable
125 code. Agate was previously known as journalism.")))
127 (define-public python-agate-sql
129 (inherit base-package)
130 (name "python-agate-sql")
135 (url "https://github.com/wireservice/agate-sql.git")
137 (file-name (git-file-name name version))
140 "16q0b211n5b1qmhzkfl2jr56lda0rvyh5j1wzw26h2n4pm4wxlx2"))))
142 `(("python-agate" ,python-agate)
143 ("python-crate" ,python-crate)
144 ("python-sqlalchemy" ,python-sqlalchemy)))
145 (home-page "https://agate-sql.rtfd.org")
146 (synopsis "SQL read/write support to agate")
147 (description "@code{agatesql} uses a monkey patching pattern to add SQL
148 support to all @code{agate.Table} instances.")))