From ed0f595db4b6610f017c213433f1e98c84960c37 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 29 May 2022 02:00:02 +0200 Subject: gnu: micropython: Update to 1.18. * gnu/packages/python.scm (micropython): Update to 1.18. [source, arguments]: Don't explicitly return #t from snippet or phases. --- gnu/packages/python.scm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index db8bf5d576..71cc21751c 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -30,7 +30,7 @@ ;;; Copyright © 2016, 2017 Stefan Reichör ;;; Copyright © 2016, 2017 Alex Vong ;;; Copyright © 2016, 2017, 2018 Arun Isaac -;;; Copyright © 2016–2018, 2021 Tobias Geerinckx-Rice +;;; Copyright © 2016–2018, 2021, 2022 Tobias Geerinckx-Rice ;;; Copyright © 2016, 2017, 2018, 2021 Julien Lepiller ;;; Copyright © 2016, 2017 Thomas Danckaert ;;; Copyright © 2017 Carlo Zancanaro @@ -673,7 +673,7 @@ (define-public python-minimal-wrapper (wrap-python3 python-minimal)) (define-public micropython (package (name "micropython") - (version "1.15") + (version "1.18") (source (origin (method url-fetch) @@ -681,7 +681,7 @@ (define-public micropython "releases/download/v" version "/micropython-" version ".tar.xz")) (sha256 - (base32 "04sfrfcljhfps340l4wh5ffwkhw1ydraday8nv92nv7gmnrj1l2j")) + (base32 "1d1yza02pwq3kh8531ryq9sjk7zjqh786nnw397cccfk5ss73z4n")) (modules '((guix build utils))) (snippet '(begin @@ -689,8 +689,7 @@ (define-public micropython (with-directory-excursion "lib" ;; TODO: Unbundle axtls and berkley-db-1.xx (for-each delete-file-recursively - '("libffi" "lwip" "stm32lib" "nrfx"))) - #t)))) + '("libffi" "lwip" "stm32lib" "nrfx"))))))) (build-system gnu-build-system) (arguments `(#:phases @@ -704,15 +703,13 @@ (define-public micropython (chdir "ports/unix") ;; see: https://github.com/micropython/micropython/pull/4246 (substitute* "Makefile" - (("-Os") "-Os -ffp-contract=off")) - #t)) + (("-Os") "-Os -ffp-contract=off")))) (replace 'install-license-files ;; We don't build in the root directory so the file isn't found. (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (dest (string-append out "/share/doc/" ,name "-" ,version "/"))) - (install-file "../../LICENSE" dest)) - #t)) + (install-file "../../LICENSE" dest)))) (delete 'configure)) ; no configure #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) "V=1") -- cgit v1.2.3 From 494a34410ebf94f8461f435d15c3baadf14c2ec6 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 29 May 2022 02:00:01 +0200 Subject: gnu: micropython: Remove input labels. * gnu/packages/python.scm (micropython)[native-inputs]: Remove input labels. --- gnu/packages/python.scm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 71cc21751c..4676409eec 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -714,9 +714,7 @@ (define-public micropython #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) "V=1") #:test-target "test")) - (native-inputs - `(("pkg-config" ,pkg-config) - ("python" ,python-wrapper))) + (native-inputs (list pkg-config python-wrapper)) (inputs (list libffi)) (home-page "https://micropython.org/") -- cgit v1.2.3 From 9769867272b6120de5ff846e48211a51838aaa96 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 29 May 2022 02:00:00 +0200 Subject: gnu: micropython: Use G-expressions. * gnu/packages/python.scm (micropython)[arguments]: Rewrite as G-expressions. --- gnu/packages/python.scm | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 4676409eec..1727024bfe 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -692,28 +692,30 @@ (define-public micropython '("libffi" "lwip" "stm32lib" "nrfx"))))))) (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'build 'build-mpy-cross - (lambda* (#:key make-flags #:allow-other-keys) - (with-directory-excursion "mpy-cross" - (apply invoke "make" make-flags)))) - (add-after 'build-mpy-cross 'prepare-build - (lambda _ - (chdir "ports/unix") - ;; see: https://github.com/micropython/micropython/pull/4246 - (substitute* "Makefile" - (("-Os") "-Os -ffp-contract=off")))) - (replace 'install-license-files - ;; We don't build in the root directory so the file isn't found. - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (dest (string-append out "/share/doc/" ,name "-" ,version "/"))) - (install-file "../../LICENSE" dest)))) - (delete 'configure)) ; no configure - #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - "V=1") - #:test-target "test")) + (list #:phases + #~(modify-phases %standard-phases + (add-before 'build 'build-mpy-cross + (lambda* (#:key make-flags #:allow-other-keys) + (with-directory-excursion "mpy-cross" + (apply invoke "make" make-flags)))) + (add-after 'build-mpy-cross 'prepare-build + (lambda _ + (chdir "ports/unix") + ;; see: https://github.com/micropython/micropython/pull/4246 + (substitute* "Makefile" + (("-Os") "-Os -ffp-contract=off")))) + (replace 'install-license-files + ;; We don't build in the root directory so the file isn't found. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (string-append out "/share/doc/" + #$name "-" #$version "/"))) + (install-file "../../LICENSE" doc)))) + (delete 'configure)) ; no configure + #:make-flags + #~(list (string-append "PREFIX=" #$output) + "V=1") + #:test-target "test")) (native-inputs (list pkg-config python-wrapper)) (inputs (list libffi)) -- cgit v1.2.3 From 847aa3942b5edea04d56dfb75ad1d88a3e9bb256 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 29 May 2022 02:00:00 +0200 Subject: gnu: micropython: Don't override 'install-license-files. * gnu/packages/python.scm (micropython)[arguments]: Prefix a new 'chdir-back phase instead of overriding 'install-license-files. --- gnu/packages/python.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1727024bfe..ad475d8acc 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -704,13 +704,10 @@ (define-public micropython ;; see: https://github.com/micropython/micropython/pull/4246 (substitute* "Makefile" (("-Os") "-Os -ffp-contract=off")))) - (replace 'install-license-files + (add-before 'install-license-files 'chdir-back ;; We don't build in the root directory so the file isn't found. - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (doc (string-append out "/share/doc/" - #$name "-" #$version "/"))) - (install-file "../../LICENSE" doc)))) + (lambda _ + (chdir "../.."))) (delete 'configure)) ; no configure #:make-flags #~(list (string-append "PREFIX=" #$output) -- cgit v1.2.3