From af52ba64fa6350690d65a1aca9c89e13103fd8d0 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 24 Feb 2020 09:31:12 -0500 Subject: gnu: git-repo: Update to 2.3. * gnu/packages/android.scm (git-repo): Update to 2.3. [arguments]: Remove the #:python argument. git-repo v2.x is now compatible with Python 3. [phases]{configure-git}: New phase. {set-executable-paths}: Adapt the substitution rule for the GIT command. {check}: Use the "run_tests" script to launch tests. [native-inputs]: Replace python2-nose by python-test. --- gnu/packages/android.scm | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'gnu/packages/android.scm') diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index 30dd8925a4..ba883f1ff9 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2018 Efraim Flashner ;;; Copyright © 2019 Andreas Enge ;;; Copyright © 2019 Ricardo Wurmus +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -716,7 +717,7 @@ (define-public android-udev-rules (define-public git-repo (package (name "git-repo") - (version "1.12.37") + (version "2.3") (source (origin (method git-fetch) @@ -725,11 +726,10 @@ (define-public git-repo (commit (string-append "v" version)))) (file-name (string-append "git-repo-" version "-checkout")) (sha256 - (base32 "0qp7jqhblv7xblfgpcq4n18dyjdv8shz7r60c3vnjxx2fngkj2jd")))) + (base32 "0jrll0mjfwakyjvlhbxwsdi32jhgss9mwz8c8h24n1qbqqxysrk4")))) (build-system python-build-system) (arguments - `(#:python ,python-2 ; code says: "Python 3 support is … experimental." - #:phases + `(#:phases (modify-phases %standard-phases (add-before 'build 'set-executable-paths (lambda* (#:key inputs outputs #:allow-other-keys) @@ -738,8 +738,8 @@ (define-public git-repo (gpg (assoc-ref inputs "gnupg")) (ssh (assoc-ref inputs "ssh"))) (substitute* '("repo" "git_command.py") - (("^GIT = 'git' ") - (string-append "GIT = '" git "/bin/git' "))) + (("^GIT = 'git'") + (string-append "GIT = '" git "/bin/git'"))) (substitute* "repo" ((" cmd = \\['gpg',") (string-append " cmd = ['" gpg "/bin/gpg',"))) @@ -777,9 +777,14 @@ (define-public git-repo ((" rev = _Verify\\(.*\\)") " rev = None")) #t))) (delete 'build) ; nothing to build + (add-before 'check 'configure-git + (lambda _ + (setenv "HOME" (getcwd)) + (invoke "git" "config" "--global" "user.email" "you@example.com") + (invoke "git" "config" "--global" "user.name" "Your Name"))) (replace 'check (lambda _ - (invoke "python" "-m" "nose"))) + (invoke "./run_tests"))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -798,7 +803,7 @@ (define-public git-repo ("gnupg" ,gnupg) ("ssh" ,openssh))) (native-inputs - `(("nose" ,python2-nose))) + `(("pytest" ,python-pytest))) (home-page "https://code.google.com/p/git-repo/") (synopsis "Helps to manage many Git repositories.") (description "Repo is a tool built on top of Git. Repo helps manage many -- cgit v1.2.3