[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/37: gnu: Add python-gitdb.
From: |
Marius Bakke |
Subject: |
19/37: gnu: Add python-gitdb. |
Date: |
Wed, 28 Feb 2018 10:33:53 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit ea4be20af07ded69670b38fb321e3f5874f7ad41
Author: Marius Bakke <address@hidden>
Date: Wed Feb 28 02:29:39 2018 +0100
gnu: Add python-gitdb.
* gnu/packages/version-control.scm (python-gitdb, python2-gitdb): New public
variables.
---
gnu/packages/version-control.scm | 60 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 59 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 229dab5..adf28ed 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -15,7 +15,7 @@
;;; Copyright © 2017 Vasile Dumitrascu <address@hidden>
;;; Copyright © 2017 Clément Lassieur <address@hidden>
;;; Copyright © 2017 André <address@hidden>
-;;; Copyright © 2017 Marius Bakke <address@hidden>
+;;; Copyright © 2017, 2018 Marius Bakke <address@hidden>
;;; Copyright © 2017 Stefan Reichör <address@hidden>
;;; Copyright © 2017 Oleg Pykhalov <address@hidden>
;;;
@@ -52,6 +52,7 @@
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages check)
#:use-module (gnu packages cook)
#:use-module (gnu packages curl)
#:use-module (gnu packages docbook)
@@ -633,6 +634,63 @@ default) of the repository.")
(package-with-python2
(strip-python2-variant python-ghp-import)))
+(define-public python-gitdb
+ (package
+ (name "python-gitdb")
+ (version "2.0.3")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "gitdb2" version))
+ (sha256
+ (base32
+ "02azg62mr99b7cllyjrly77np3vw32y8nrxpa2xjapiyaga2j3mn"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'check 'create-test-repository
+ (lambda _
+ (mkdir "/tmp/testrepo")
+ ;; Some tests require a git repository, so create one.
+ (with-directory-excursion "/tmp/testrepo"
+ (do ((filecount 1 (1+ filecount)))
+ ((> filecount 1000))
+ (call-with-output-file (string-append
+ "file" (number->string
filecount))
+ (lambda (port)
+ (format port "~a" filecount))))
+ (and
+ (invoke "git" "init")
+ (invoke "git" "config" "user.name" "Total Git")
+ (invoke "git" "config" "user.email" "address@hidden")
+ (invoke "git" "add" "-A")
+ (invoke "git" "commit" "-q" "-m" "dummy commit")))
+
+ ;; The repository checkout must be a "bare" clone.
+ (invoke "git" "clone" "--bare" "/tmp/testrepo"
+ "/tmp/testrepo.git")))
+ (replace 'check
+ (lambda _
+ (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
+ ;; Skip tests that must be run from the gitdb repository.
+ (setenv "TRAVIS" "1")
+ (invoke "nosetests" "-v"))))))
+ (propagated-inputs
+ `(("python-smmap2" ,python-smmap2)))
+ (native-inputs
+ `(("git" ,git)
+ ("python-nose" ,python-nose)))
+ (home-page "https://github.com/gitpython-developers/gitdb")
+ (synopsis "Python implementation of the Git object database")
+ (description
+ "GitDB allows you to access @dfn{bare} Git repositories for reading and
+writing. It aims at allowing full access to loose objects as well as packs
+with performance and scalability in mind. It operates exclusively on streams,
+allowing to handle large objects with a small memory footprint.")
+ (license license:bsd-3)))
+
+(define-public python2-gitdb
+ (package-with-python2 python-gitdb))
+
(define-public shflags
(package
(name "shflags")
- 35/37: gnu: python-netifaces: Update to 0.10.6., (continued)
- 35/37: gnu: python-netifaces: Update to 0.10.6., Marius Bakke, 2018/02/28
- 17/37: gnu: Add python-rfc3986., Marius Bakke, 2018/02/28
- 28/37: gnu: python-oslo.serialization: Update to 2.24.0., Marius Bakke, 2018/02/28
- 26/37: gnu: Add python-pyinotify., Marius Bakke, 2018/02/28
- 23/37: gnu: python-debtcollector: Update to 1.19.0., Marius Bakke, 2018/02/28
- 21/37: gnu: python-bandit: Update to 1.4.0., Marius Bakke, 2018/02/28
- 36/37: gnu: python-html5lib: Update to 1.0.1., Marius Bakke, 2018/02/28
- 32/37: gnu: python-oslo.log: Update to 3.36.0., Marius Bakke, 2018/02/28
- 29/37: gnu: python-msgpack: Update to 0.5.6., Marius Bakke, 2018/02/28
- 31/37: gnu: python-monotonic: Update to 1.4., Marius Bakke, 2018/02/28
- 19/37: gnu: Add python-gitdb.,
Marius Bakke <=
- 33/37: gnu: python-wrapt: Update to 1.10.11., Marius Bakke, 2018/02/28
- 34/37: gnu: python-psutil: Update to 5.4.3., Marius Bakke, 2018/02/28
- 13/37: gnu: python2-swiftclient: Enable tests., Marius Bakke, 2018/02/28