guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add python-clf.


From: Oleg Pykhalov
Subject: 01/01: gnu: Add python-clf.
Date: Mon, 20 Nov 2017 01:32:07 -0500 (EST)

wigust pushed a commit to branch master
in repository guix.

commit 036f1eedcc46e50fda525a65eef5de1797ce4f4d
Author: Oleg Pykhalov <address@hidden>
Date:   Fri Nov 3 18:39:17 2017 +0300

    gnu: Add python-clf.
    
    * gnu/packages/web.scm (python-clf): New variable.
---
 gnu/packages/web.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 8a6cd91..a4a8778 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -5212,6 +5212,58 @@ internetarchive python module for programatic access to 
archive.org.")
   (package-with-python2
    (strip-python2-variant python-internetarchive)))
 
+(define-public python-clf
+  (let ((commit-test-clf "d01d25923c599d3261910f79fb948825b4270d07")) ; 0.5.7
+    (package
+      (name "python-clf")
+      (version "0.5.7")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (pypi-uri "clf" version))
+         (sha256
+          (base32
+           "0zlkzqnpz7a4iavsq5vaz0nf5nr7qm5znpg1vlpz6rwnx6hikjdb"))))
+      (build-system python-build-system)
+      (propagated-inputs
+       `(("python-docopt" ,python-docopt)
+         ("python-pygments" ,python-pygments)
+         ("python-requests" ,python-requests)
+         ("python-nose" ,python-nose)
+         ("python-lxml" ,python-lxml)
+         ("python-pyaml" ,python-pyaml)))
+      (inputs
+       `(("test-clf"
+          ,(origin
+             (method url-fetch)
+             (uri (string-append "https://raw.githubusercontent.com";
+                                 "/ncrocfer/clf/" commit-test-clf
+                                 "/test_clf.py"))
+             (sha256
+              (base32
+               "19lr5zdzsmxgkg7wrjq1yzkiahd03wi4k3dskssyhmjls8c10nqd"))))))
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'get-tests
+             (lambda _
+               (copy-file (assoc-ref %build-inputs "test-clf") "test_clf.py")))
+           (replace 'check
+             (lambda _
+               (zero? (system* "nosetests"
+                               ;; These tests require internet connection
+                               "--exclude=test_browse"
+                               "--exclude=test_command"
+                               "--exclude=test_search")))))))
+      (home-page "https://github.com/ncrocfer/clf";)
+      (synopsis "Search code snippets on @url{https://commandlinefu.com}";)
+      (description "@code{clf} is a command line tool for searching code
+snippets on @url{https://commandlinefu.com}.";)
+      (license l:expat))))
+
+(define-public python2-clf
+  (package-with-python2 python-clf))
+
 (define-public r-shiny
   (package
     (name "r-shiny")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]