gnu: Add python-freezegun.

* gnu/packages/python.scm (python-freezegun, python2-freezegun): New variables.

Signed-off-by: Leo Famulari <leo@famulari.name>
This commit is contained in:
Troy Sankey 2016-08-14 13:38:20 -04:00 committed by Leo Famulari
parent 5b63a8568b
commit 974ee2c152
No known key found for this signature in database
GPG Key ID: 2646FA30BACA7F08
1 changed files with 40 additions and 0 deletions

View File

@ -10224,3 +10224,43 @@ List. Forked from and using the same API as the publicsuffix package.")
(native-inputs (native-inputs
`(("python2-setuptools" ,python2-setuptools) `(("python2-setuptools" ,python2-setuptools)
,@(package-native-inputs base)))))) ,@(package-native-inputs base))))))
(define-public python-freezegun
(package
(name "python-freezegun")
(version "0.3.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "freezegun" version))
(sha256
(base32
"14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
(build-system python-build-system)
(native-inputs
`(("python-mock" ,python-mock)
("python-nose" ,python-nose)
("python-coverage" ,python-coverage)
("python-dateutil-2" ,python-dateutil-2)))
(inputs
`(("python-six" ,python-six)))
(arguments
`(#:phases (modify-phases %standard-phases
;; The tests are normally executed via `make test`, but the PyPi
;; package does not include the Makefile.
(replace 'check
(lambda _
(zero? (system* "nosetests" "./tests/")))))))
(home-page "https://github.com/spulec/freezegun")
(synopsis "Test utility for mocking the datetime module")
(description
"FreezeGun is a library that allows your python tests to travel through
time by mocking the datetime module.")
(license license:asl2.0)))
(define-public python2-freezegun
(let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
(package (inherit base)
(native-inputs
`(("python2-setuptools" ,python2-setuptools)
,@(package-native-inputs base))))))