gnu: python-dateutil: Update to 2.7.3.
[jackhill/guix/guix.git] / gnu / packages / time.scm
CommitLineData
233e7676
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
33dc54b0
RW
3;;; Copyright © 2013, 2017 Ludovic Courtès <ludo@gnu.org>
4;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
64f925cb 5;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
33dc54b0
RW
6;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name>
7;;; Copyright © 2015, 2017 Cyril Roelandt <tipecaml@gmail.com>
8;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
9;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
10;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
11;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
33fdde8d 12;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5d20e1ec 13;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
4a78fd46 14;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
33dc54b0 15;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
f8460d26 16;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
b147f59f 17;;;
233e7676 18;;; This file is part of GNU Guix.
b147f59f 19;;;
233e7676 20;;; GNU Guix is free software; you can redistribute it and/or modify it
b147f59f
NK
21;;; under the terms of the GNU General Public License as published by
22;;; the Free Software Foundation; either version 3 of the License, or (at
23;;; your option) any later version.
24;;;
233e7676 25;;; GNU Guix is distributed in the hope that it will be useful, but
b147f59f
NK
26;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28;;; GNU General Public License for more details.
29;;;
30;;; You should have received a copy of the GNU General Public License
233e7676 31;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
b147f59f 32
1ffa7090 33(define-module (gnu packages time)
4a44e743 34 #:use-module (guix licenses)
b147f59f
NK
35 #:use-module (guix packages)
36 #:use-module (guix download)
5d20e1ec
BW
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system python)
ac257f12 39 #:use-module (gnu packages check)
33dc54b0 40 #:use-module (gnu packages compression)
5d20e1ec 41 #:use-module (gnu packages python))
b147f59f
NK
42
43(define-public time
44 (package
45 (name "time")
64f925cb 46 (version "1.9")
b147f59f
NK
47 (source
48 (origin
49 (method url-fetch)
50 (uri (string-append "mirror://gnu/time/time-"
51 version ".tar.gz"))
52 (sha256
53 (base32
64f925cb 54 "07jj7cz6lc13iqrpgn81ivqh8rkm73p4rnivwgrrshk23v4g1b7v"))))
b147f59f 55 (build-system gnu-build-system)
6fd52309 56 (home-page "https://www.gnu.org/software/time/")
f50d2669 57 (synopsis "Run a command, then display its resource usage")
b147f59f 58 (description
a22dc0c4
LC
59 "Time is a command that displays information about the resources that a
60program uses. The display output of the program can be customized or saved
61to a file.")
c8b38f8e 62 (license gpl3+)))
5d20e1ec
BW
63
64(define-public python-pytzdata
65 (package
66 (name "python-pytzdata")
01e9bc46 67 (version "2017.3.1")
5d20e1ec
BW
68 (source
69 (origin
70 (method url-fetch)
71 (uri (pypi-uri "pytzdata" version))
72 (sha256
73 (base32
01e9bc46 74 "1wi3jh39zsa9iiyyhynhj7w5b2p9wdyd0ppavpsrmf3wxvr7cwz8"))))
5d20e1ec
BW
75 (build-system python-build-system)
76 (native-inputs
77 `(("python-pytest" ,python-pytest)
78 ("python-nose" ,python-nose)))
79 (home-page "https://github.com/sdispater/pytzdata")
80 (synopsis "Timezone database for Python")
81 (description
82 "This library provides a timezone database for Python.")
83 (license expat)))
84
85(define-public python2-tzdata
86 (package-with-python2 python-pytzdata))
89c3eaaa 87
33dc54b0
RW
88(define-public python-pytz
89 (package
90 (name "python-pytz")
cb5ba282 91 (version "2018.5")
33dc54b0
RW
92 (source
93 (origin
94 (method url-fetch)
cb5ba282 95 (uri (pypi-uri "pytz" version ".tar.gz"))
33dc54b0
RW
96 (sha256
97 (base32
cb5ba282 98 "0xzj5gkpdn2da8m6j47chlp6zrzcypv9m0fjv4236q3jw4fyzfgz"))))
33dc54b0 99 (build-system python-build-system)
33dc54b0
RW
100 (home-page "http://pythonhosted.org/pytz")
101 (synopsis "Python timezone library")
102 (description "This library brings the Olson tz database into Python. It
103allows accurate and cross platform timezone calculations using Python 2.4 or
104higher. It also solves the issue of ambiguous times at the end of daylight
105saving time. Almost all of the Olson timezones are supported.")
106 (license expat)))
107
108(define-public python2-pytz
109 (package-with-python2 python-pytz))
110
89c3eaaa
BW
111(define-public python-pendulum
112 (package
113 (name "python-pendulum")
114 (version "1.2.4")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (pypi-uri "pendulum" version))
119 (sha256
120 (base32
121 "1fj36yxi2f4lzchzd8ny1qjl67dbypnk0gn8qwad2w78579m8m8z"))))
122 (build-system python-build-system)
123 (native-inputs
124 `(("python-pytest" ,python-pytest)
125 ("python-nose" ,python-nose)))
126 (propagated-inputs
127 `(("python-dateutil" ,python-dateutil)
128 ("python-pytzdata" ,python-pytzdata)
129 ("python-tzlocal" ,python-tzlocal)))
130 (home-page "https://github.com/sdispater/pendulum")
131 (synopsis "Alternate API for Python datetimes")
132 (description "Pendulum is a drop-in replacement for the standard
133@{datetime} class, providing an alternative API. As it inherits from the
134standard @code{datetime} all @code{datetime} instances can be replaced by
135Pendulum instances.")
136 (license expat)))
137
138(define-public python2-pendulum
139 (package-with-python2 python-pendulum))
33dc54b0
RW
140
141(define-public python-dateutil
142 (package
143 (name "python-dateutil")
e30fc546 144 (version "2.7.3")
33dc54b0
RW
145 (source
146 (origin
147 (method url-fetch)
148 (uri (pypi-uri "python-dateutil" version))
149 (sha256
150 (base32
e30fc546 151 "1f7h54lg0w2ckch7592xpjkh8dg87k2br256h0iw49zn6bg02w72"))))
33dc54b0 152 (build-system python-build-system)
e30fc546
MB
153 (native-inputs
154 `(("python-setuptools-scm" ,python-setuptools-scm)))
33dc54b0
RW
155 (propagated-inputs
156 `(("python-six" ,python-six)))
157 (home-page "https://dateutil.readthedocs.io/en/stable/")
158 (synopsis "Extensions to the standard datetime module")
159 (description
160 "The dateutil module provides powerful extensions to the standard
161datetime module, available in Python 2.3+.")
e30fc546
MB
162 ;; The license was changed from the three-clause BSD license to a dual
163 ;; Apache 2.0/BSD-3 variant at 2017-12-01. Some code is only available as
164 ;; BSD-3 still; but all new code is dual licensed (the user can choose).
165 (license (list bsd-3 asl2.0))))
33dc54b0
RW
166
167(define-public python2-dateutil
168 (package-with-python2 python-dateutil))
169
170(define-public python-parsedatetime
171 (package
172 (name "python-parsedatetime")
173 (version "2.4")
174 (source
175 (origin
176 (method url-fetch)
177 (uri (pypi-uri "parsedatetime" version))
178 (sha256
179 (base32
180 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
181 (build-system python-build-system)
182 (native-inputs
183 `(("python-nose" ,python-nose)
184 ("python-pyicu" ,python-pyicu)
185 ("python-pytest" ,python-pytest)
186 ("python-pytest-runner" ,python-pytest-runner)))
187 (propagated-inputs
188 `(("python-future" ,python-future)))
189 (home-page "https://github.com/bear/parsedatetime/")
190 (synopsis "Parse human-readable date/time text")
191 (description
192 "Parse human-readable date/time text.")
193 (license asl2.0)))
194
195(define-public python2-parsedatetime
196 (package-with-python2 python-parsedatetime))
197
198(define-public python-tzlocal
199 (package
200 (name "python-tzlocal")
201 (version "1.2.2")
202 (source
203 (origin
204 (method url-fetch)
205 (uri (pypi-uri "tzlocal" version))
206 (sha256
207 (base32
208 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
209 (build-system python-build-system)
210 (propagated-inputs
211 `(("python-pytz" ,python-pytz)))
212 (home-page "https://github.com/regebro/tzlocal")
213 (synopsis "Local timezone information for Python")
214 (description
215 "Tzlocal returns a tzinfo object with the local timezone information.
216This module attempts to fix a glaring hole in pytz, that there is no way to
217get the local timezone information, unless you know the zoneinfo name, and
218under several distributions that's hard or impossible to figure out.")
219 (license cc0)))
220
221(define-public python-isodate
222 (package
223 (name "python-isodate")
224 (version "0.5.4")
225 (source
226 (origin
227 (method url-fetch)
228 (uri (pypi-uri "isodate" version))
229 (sha256
230 (base32
231 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
232 (build-system python-build-system)
233 (home-page "http://cheeseshop.python.org/pypi/isodate")
234 (synopsis "Python date parser and formatter")
235 (description
236 "Python-isodate is a python module for parsing and formatting
237ISO 8601 dates, time and duration.")
238 (license bsd-3)))
239
240(define-public python2-isodate
241 (package-with-python2 python-isodate))
242
243(define-public python-iso8601
244 (package
245 (name "python-iso8601")
246 (version "0.1.11")
247 (source
248 (origin
249 (method url-fetch)
250 (uri (pypi-uri "iso8601" version))
251 (sha256
252 (base32
253 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
254 (build-system python-build-system)
255 (native-inputs
256 `(("python-pytest" ,python-pytest)))
257 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
258 (synopsis "Module to parse ISO 8601 dates")
259 (description
260 "This module parses the most common forms of ISO 8601 date strings (e.g.
261@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
262 (license expat)))
263
264(define-public python2-iso8601
265 (package-with-python2 python-iso8601))
266
267(define-public python-monotonic
268 (package
269 (name "python-monotonic")
33fdde8d 270 (version "1.5")
33dc54b0
RW
271 (source
272 (origin
273 (method url-fetch)
db3e631d 274 (uri (pypi-uri "monotonic" version))
33dc54b0
RW
275 (sha256
276 (base32
33fdde8d 277 "1c6z46yb600klbfhqadyl7vq0jdjdxkm72k43ra3iw3d0xakv593"))))
33dc54b0 278 (build-system python-build-system)
33fdde8d 279 (arguments '(#:tests? #f)) ; no tests
33dc54b0
RW
280 (home-page "https://github.com/atdt/monotonic")
281 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
282 (description
283 "This module provides a @code{monotonic()} function which returns the
284value (in fractional seconds) of a clock which never goes backwards.")
285 (license asl2.0)))
286
287(define-public python2-monotonic
288 (package-with-python2 python-monotonic))
289
290(define-public python-pyrfc3339
291 (package
292 (name "python-pyrfc3339")
0ce92d74 293 (version "1.1")
33dc54b0
RW
294 (source
295 (origin
296 (method url-fetch)
297 (uri (pypi-uri "pyRFC3339" version))
298 (sha256
299 (base32
0ce92d74 300 "06jv7ar7lpvvk0dixzwdr3wgm0g1lipxs429s2z7knwwa7hwpf41"))))
33dc54b0
RW
301 (build-system python-build-system)
302 (propagated-inputs
303 `(("python-pytz" ,python-pytz)))
304 (native-inputs
305 `(("python-nose" ,python-nose)))
306 (home-page "https://github.com/kurtraschke/pyRFC3339")
307 (synopsis "Python timestamp library")
308 (description "Python library for generating and parsing RFC 3339-compliant
309timestamps.")
310 (license expat)))
311
312(define-public python2-pyrfc3339
313 (package-with-python2 python-pyrfc3339))
314
315(define-public python-arrow
316 (package
317 (name "python-arrow")
318 (version "0.10.0")
319 (source (origin
320 (method url-fetch)
321 (uri (pypi-uri "arrow" version))
322 (sha256
323 (base32
324 "08n7q2l69hlainds1byd4lxhwrq7zsw7s640zkqc3bs5jkq0cnc0"))))
325 (build-system python-build-system)
326 (native-inputs
327 `(;; For testing
328 ("python-chai" ,python-chai)
329 ("python-simplejson" ,python-simplejson)))
330 (propagated-inputs
331 `(("python-dateutil" ,python-dateutil)))
332 (home-page "https://github.com/crsmithdev/arrow/")
333 (synopsis "Dates and times for Python")
334 (description
335 "Arrow is a Python library to creating, manipulating, formatting and
336converting dates, times, and timestamps. It implements and updates the
337datetime type.")
338 (license asl2.0)))
339
340(define-public python2-arrow
341 (package-with-python2 python-arrow))
342
343(define-public python-aniso8601
344 (package
345 (name "python-aniso8601")
346 (version "1.3.0")
347 (source
348 (origin
349 (method url-fetch)
350 (uri (pypi-uri "aniso8601" version))
351 (sha256
352 (base32
353 "1waj54iv3n3lw1fapbz8a93yjgrybgpc86wif5baxdh1arpj9df3"))))
354 (build-system python-build-system)
355 (propagated-inputs
356 `(("python-dateutil" ,python-dateutil)))
357 (home-page "https://bitbucket.org/nielsenb/aniso8601")
358 (synopsis "Python library for parsing ISO 8601 strings")
359 (description
360 "This package contains a library for parsing ISO 8601 datetime strings.")
361 (license bsd-3)))
362
363(define-public python2-aniso8601
364 (package-with-python2 python-aniso8601))