unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28282] [PATCH 2/3] gnu: python2-ttystatus: Enable tests.
       [not found] <20170829200905.30771-1-arunisaac@systemreboot.net>
@ 2017-08-29 20:09 ` Arun Isaac
  2017-08-31 13:26   ` Ludovic Courtès
  2017-08-29 20:09 ` [bug#28282] [PATCH 3/3] gnu: python2-larch: " Arun Isaac
  1 sibling, 1 reply; 5+ messages in thread
From: Arun Isaac @ 2017-08-29 20:09 UTC (permalink / raw)
  To: 28282

* gnu/packages/python.scm (python2-ttystatus)[arguments]: Replace 'check'
phase with custom function.
---
 gnu/packages/python.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b81e6e47c..675742696 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -14031,8 +14031,20 @@ iterating over input files.")
         (base32
          "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
     (build-system python-build-system)
+    (native-inputs
+     `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
+       ("python2-pep8" ,python2-pep8)))
     (arguments
-     `(#:python ,python-2))
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         ;; check phase needs to be run before the build phase. If not,
+         ;; coverage-test-runner looks for tests for the built source files,
+         ;; and fails.
+         (delete 'check)
+         (add-before 'build 'check
+           (lambda _
+             (zero? (system* "make" "check")))))))
     (home-page "https://liw.fi/ttystatus/")
     (synopsis "Python library for showing progress reporting and
 status updates on terminals")
-- 
2.13.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#28282] [PATCH 3/3] gnu: python2-larch: Enable tests.
       [not found] <20170829200905.30771-1-arunisaac@systemreboot.net>
  2017-08-29 20:09 ` [bug#28282] [PATCH 2/3] gnu: python2-ttystatus: Enable tests Arun Isaac
@ 2017-08-29 20:09 ` Arun Isaac
  2017-08-31 13:27   ` Ludovic Courtès
  1 sibling, 1 reply; 5+ messages in thread
From: Arun Isaac @ 2017-08-29 20:09 UTC (permalink / raw)
  To: 28282

* gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/python.scm (python2-larch)[source]: Use it.
[arguments]: Move 'check' phase to before 'build' phase.
---
 gnu/local.mk                                       |  1 +
 ...ython2-larch-coverage-4.0a6-compatibility.patch | 29 ++++++++++++++++++++++
 gnu/packages/python.scm                            | 17 ++++++++++++-
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2ff87dfa5..e8297272f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -958,6 +958,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-genshi-fix-tests-on-python-3.5.patch	\
   %D%/packages/patches/python-genshi-isstring-helper.patch	\
   %D%/packages/patches/python-genshi-stripping-of-unsafe-script-tags.patch	\
+  %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
   %D%/packages/patches/python-parse-too-many-fields.patch	\
   %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch	\
   %D%/packages/patches/python-statsmodels-fix-tests.patch	\
diff --git a/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch b/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch
new file mode 100644
index 000000000..f1db5d7c3
--- /dev/null
+++ b/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch
@@ -0,0 +1,29 @@
+From ca548da9ba78ddee90779051210e3e89185e4f7d Mon Sep 17 00:00:00 2001
+From: Michel Alexandre Salim <michel@michel-slm.name>
+Date: Mon, 15 Feb 2016 23:03:42 +0700
+Subject: coverage-4.0a6 compatibility
+
+coverage 4.0a6 no longer generates .coverage file, so use -f when
+deleting .coverage to ensure deletion does not fail.
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+(limited to 'Makefile')
+
+diff --git a/Makefile b/Makefile
+index 7818f57..362c07f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -23,7 +23,7 @@ fsck-larch.1: fsck-larch.1.in fsck-larch
+ 
+ check:
+ 	python -m CoverageTestRunner --ignore-missing-from=without-tests
+-	rm .coverage
++	rm -f .coverage
+ 	./insert-remove-test tempdir 100
+ 	rm -r tempdir larch.log
+ 	cmdtest tests
+-- 
+cgit v1.1
+
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 675742696..77d7f6e29 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -68,6 +68,7 @@
   #:use-module (gnu packages attr)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
@@ -14091,12 +14092,26 @@ happens using the @code{logging} library.")
        (uri (string-append
              "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
              version ".tar.gz"))
+       (patches (search-patches
+                 "python2-larch-coverage-4.0a6-compatibility.patch"))
        (sha256
         (base32
          "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2))
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         ;; check phase needs to be run before the build phase. If not,
+         ;; coverage-test-runner looks for tests for the built source files,
+         ;; and fails.
+         (delete 'check)
+         (add-before 'build 'check
+           (lambda _
+             (zero? (system* "make" "check")))))))
+    (native-inputs
+     `(("cmdtest" ,cmdtest)
+       ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
     (propagated-inputs
      `(("python2-tracing" ,python2-tracing)))
     (home-page "https://liw.fi/larch/")
-- 
2.13.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#28282] [PATCH 2/3] gnu: python2-ttystatus: Enable tests.
  2017-08-29 20:09 ` [bug#28282] [PATCH 2/3] gnu: python2-ttystatus: Enable tests Arun Isaac
@ 2017-08-31 13:26   ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2017-08-31 13:26 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 28282

Arun Isaac <arunisaac@systemreboot.net> skribis:

> * gnu/packages/python.scm (python2-ttystatus)[arguments]: Replace 'check'
> phase with custom function.

LGTM, thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#28282] [PATCH 3/3] gnu: python2-larch: Enable tests.
  2017-08-29 20:09 ` [bug#28282] [PATCH 3/3] gnu: python2-larch: " Arun Isaac
@ 2017-08-31 13:27   ` Ludovic Courtès
  2017-09-01  6:06     ` bug#28282: " Arun Isaac
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2017-08-31 13:27 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 28282

Arun Isaac <arunisaac@systemreboot.net> skribis:

> * gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch: New
> file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/python.scm (python2-larch)[source]: Use it.
> [arguments]: Move 'check' phase to before 'build' phase.

LGTM, thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#28282: [PATCH 3/3] gnu: python2-larch: Enable tests.
  2017-08-31 13:27   ` Ludovic Courtès
@ 2017-09-01  6:06     ` Arun Isaac
  0 siblings, 0 replies; 5+ messages in thread
From: Arun Isaac @ 2017-09-01  6:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 28282-done


Pushed all, thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-01  6:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170829200905.30771-1-arunisaac@systemreboot.net>
2017-08-29 20:09 ` [bug#28282] [PATCH 2/3] gnu: python2-ttystatus: Enable tests Arun Isaac
2017-08-31 13:26   ` Ludovic Courtès
2017-08-29 20:09 ` [bug#28282] [PATCH 3/3] gnu: python2-larch: " Arun Isaac
2017-08-31 13:27   ` Ludovic Courtès
2017-09-01  6:06     ` bug#28282: " Arun Isaac

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).