From 5faa5ce4ef10ac5deefe325b6243fcd252f6478a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 26 Aug 2015 23:24:16 +0200 Subject: gnu: Add python-ly. * gnu/packages/python.scm (python-ly): New variable. --- gnu/packages/python.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 940efeca64..75f285fbed 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -4629,3 +4629,26 @@ term.js Javascript terminal emulator library.") ,python2-backport-ssl-match-hostname) ,@(alist-delete "python-tornado" (package-propagated-inputs terminado))))))) + +(define-public python-ly + (package + (name "python-ly") + (version "0.9.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/p/python-ly/python-ly-" + version ".tar.gz")) + (sha256 + (base32 + "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2")))) + (build-system python-build-system) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (synopsis "Tool and library for manipulating LilyPond files") + (description "This package provides a Python library to parse, manipulate +or create documents in LilyPond format. A command line program ly is also +provided that can be used to do various manipulations with LilyPond files.") + (home-page "https://pypi.python.org/pypi/python-ly") + (license gpl2+))) -- cgit 1.4.1 From 7e7b27d9060420a5dad8e082d71f46c0fea4a7d9 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Sun, 16 Aug 2015 16:18:09 +0200 Subject: gnu: add python-appdirs. * gnu/packages/python.scm (python-appdirs, python2-appdirs): New variables. --- gnu/packages/python.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 75f285fbed..19dcf5af79 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -4652,3 +4652,31 @@ or create documents in LilyPond format. A command line program ly is also provided that can be used to do various manipulations with LilyPond files.") (home-page "https://pypi.python.org/pypi/python-ly") (license gpl2+))) + +(define-public python-appdirs + (package + (name "python-appdirs") + (version "1.4.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/a/appdirs/appdirs-" + version + ".tar.gz")) + (sha256 + (base32 + "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg")))) + (build-system python-build-system) + (inputs + `(("python-setuptools" ,python-setuptools))) + (home-page "http://github.com/ActiveState/appdirs") + (synopsis + "Determine platform-specific dirs, e.g. a \"user data dir\"") + (description + "This module provides a portable way of finding out where user data +should be stored on various operating systems.") + (license license:expat))) + +(define-public python2-appdirs + (package-with-python2 python-appdirs)) -- cgit 1.4.1 From 89b2e0b0b846d985d76553a3759a0bd7f77a583f Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 1 Sep 2015 17:33:51 -0400 Subject: gnu: Add python-llfuse. * gnu/packages/python.scm (python-llfuse, python2-llfuse): New variables. Signed-off-by: Alex Kost --- gnu/packages/python.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 19dcf5af79..68bcbf5c34 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2015 Ricardo Wurmus ;;; Copyright © 2015 Christopher Allan Webber ;;; Copyright © 2015 Eric Dvorsak +;;; Copyright © 2015 Leo Famulari ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,7 @@ isc psfl public-domain x11-style)) #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) #:use-module (gnu packages) + #:use-module (gnu packages attr) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages fontutils) @@ -45,6 +47,7 @@ #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages libffi) + #:use-module (gnu packages linux) #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (gnu packages networking) @@ -4680,3 +4683,33 @@ should be stored on various operating systems.") (define-public python2-appdirs (package-with-python2 python-appdirs)) + +(define-public python-llfuse + (package + (name "python-llfuse") + (version "0.41") + (source (origin + (method url-fetch) + (uri (string-append + "https://bitbucket.org/nikratio/python-llfuse/downloads/" + "llfuse-" version ".tar.bz2")) + (sha256 + (base32 + "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb")))) + (build-system python-build-system) + (inputs + `(("fuse" ,fuse) + ("attr" ,attr))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python-setuptools" ,python-setuptools))) + (synopsis "Python bindings for FUSE") + (description + "Python-LLFUSE is a set of Python bindings for the low level FUSE API.") + (home-page "https://bitbucket.org/nikratio/python-llfuse/") + ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed. + ;; The rest of the package is licensed under LGPL2.0 or later. + (license (list license:expat lgpl2.0+)))) + +(define-public python2-llfuse + (package-with-python2 python-llfuse)) -- cgit 1.4.1 From 641c9871a5b903ea4cf3fbfa127a5bf2c8372542 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 1 Sep 2015 17:33:52 -0400 Subject: gnu: Add python-msgpack. * gnu/packages/python.scm (python-msgpack, python2-msgpack): New variables. Signed-off-by: Alex Kost --- gnu/packages/python.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 68bcbf5c34..313c6251c6 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -4713,3 +4713,28 @@ should be stored on various operating systems.") (define-public python2-llfuse (package-with-python2 python-llfuse)) + +(define-public python-msgpack + (package + (name "python-msgpack") + (version "0.4.6") + (source (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/m/" + "msgpack-python/msgpack-python-" version ".tar.gz")) + (sha256 + (base32 + "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z")))) + (build-system python-build-system) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (synopsis "MessagePack (de)serializer") + (description "MessagePack is a fast, compact binary serialization format, +suitable for similar data to JSON. This package provides CPython bindings for +reading and writing MessagePack data.") + (home-page "https://pypi.python.org/pypi/msgpack-python/") + (license asl2.0))) + +(define-public python2-msgpack + (package-with-python2 python-msgpack)) -- cgit 1.4.1 From 05de40c5d342232fae86e7839baec1ebffeac022 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 1 Sep 2015 23:57:22 +0200 Subject: gnu: python-testtools: fix propagated inputs. * gnu/packages/python.scm (python-testools): turn python-fixtures and python-testtools into propagated inputs. --- gnu/packages/python.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 313c6251c6..f9ad95118b 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1714,11 +1714,12 @@ Python tests.") (base32 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m")))) (build-system python-build-system) + (propagated-inputs + `(("python-fixtures" ,python-fixtures) + ("python-testtools" ,python-testtools))) (inputs `(("python-setuptools" ,python-setuptools) - ("python-testtools" ,python-testtools) ("python-subunit" ,python-subunit) - ("python-fixtures" ,python-fixtures) ("python-mimeparse" ,python-mimeparse))) (home-page "https://launchpad.net/testrepository") (synopsis "Database for Python test results") -- cgit 1.4.1 From 1cd4027cfdb82d43321c9c20f8bfad97cbd74413 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Fri, 7 Aug 2015 00:10:43 +0200 Subject: ui: Add package-description-string. Provide support for Texinfo's markup in package description. * guix/ui.scm (%text-width): New parameter. (texi->plain-text): New variable. (package->recutils): Use them. (package-description-string): New variable. * emacs/guix-main.scm (%package-param-alist): Use it. * gnu/packages/perl.scm (perl-devel-globaldestruction) (perl-devel-lexalias, perl-exporter-lite): Adapt to Texinfo's markup. * gnu/packages/python.scm (python2-empy): Likewise. --- emacs/guix-main.scm | 2 +- gnu/packages/perl.scm | 6 +++--- gnu/packages/python.scm | 2 +- guix/ui.scm | 50 ++++++++++++++++++++++++++++++++++++------------- 4 files changed, 42 insertions(+), 18 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 623da884f6..c9b84d36d9 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -293,7 +293,7 @@ Example: (license . ,package-license-names) (source . ,package-source-names) (synopsis . ,package-synopsis) - (description . ,package-description) + (description . ,package-description-string) (home-url . ,package-home-page) (outputs . ,package-outputs) (non-unique . ,(negate package-unique?)) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index c528516c15..12fed2b870 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -1705,7 +1705,7 @@ particular command is available.") (home-page "http://search.cpan.org/dist/Devel-GlobalDestruction") (synopsis "Provides equivalent of ${^GLOBAL_PHASE} eq 'DESTRUCT' for older perls") (description "Devel::GlobalDestruction provides a function returning the -equivalent of \"${^GLOBAL_PHASE} eq 'DESTRUCT'\" for older perls.") +equivalent of \"$@{^GLOBAL_PHASE@} eq 'DESTRUCT'\" for older perls.") (license (package-license perl)))) (define-public perl-devel-lexalias @@ -1949,7 +1949,7 @@ constructors, which speeds code up at runtime by a significant amount. String eval is not without its issues however - it's difficult to control the scope it's used in (which determines which variables are in scope inside the eval), and it's easy to miss compilation errors, since eval catches them and sticks -them in $@ instead. This module attempts to solve these problems. It +them in $@@ instead. This module attempts to solve these problems. It provides an eval_closure function, which evals a string in a clean environment, other than a fixed list of specified variables. Compilation errors are rethrown automatically.") @@ -1993,7 +1993,7 @@ in your modules in a \"Java-esque\" manner.") (description "Exporter::Lite is an alternative to Exporter, intended to provide a lightweight subset of the most commonly-used functionality. It supports -import(), @EXPORT and @EXPORT_OK and not a whole lot else.") +import(), @@EXPORT and @@EXPORT_OK and not a whole lot else.") (home-page (string-append "http://search.cpan.org/~neilb/" "Exporter-Lite-" version)) (license (package-license perl)))) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f9ad95118b..feddd1a46a 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1174,7 +1174,7 @@ other Python program.") "EmPy is a system for embedding Python expressions and statements in template text; it takes an EmPy source file, processes it, and produces output. This is accomplished via expansions, which are special signals to the -EmPy system and are set off by a special prefix (by default the at sign, @). +EmPy system and are set off by a special prefix (by default the at sign, @@). EmPy can expand arbitrary Python expressions and statements in this way, as well as a variety of special forms. Textual data not explicitly delimited in this way is sent unaffected to the output, allowing Python to be used in diff --git a/guix/ui.scm b/guix/ui.scm index 2f757547cf..ca5b844a43 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2013 Mark H Weaver ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014, 2015 Alex Kost +;;; Copyright © 2015 Mathieu Lirzin ;;; Copyright © 2014 Deck Pickard ;;; ;;; This file is part of GNU Guix. @@ -45,6 +46,9 @@ #:use-module (ice-9 regex) #:autoload (system repl repl) (start-repl) #:autoload (system repl debug) (make-debug stack->vector) + #:use-module (texinfo) + #:use-module (texinfo plain-text) + #:use-module (texinfo string-utils) #:export (_ N_ P_ @@ -69,6 +73,7 @@ switch-symlinks config-directory fill-paragraph + package-description-string string->recutils package->recutils package-specification->name+version+output @@ -775,6 +780,28 @@ converted to a space; sequences of more than one line break are preserved." ;;; Packages. ;;; +(define %text-width + (make-parameter (or (and=> (getenv "WIDTH") string->number) + 80))) + +(set! (@@ (texinfo plain-text) wrap*) + ;; XXX: Monkey patch this private procedure to let 'package->recutils' + ;; parameterize the fill of description field correctly. + (lambda strings + (let ((indent (fluid-ref (@@ (texinfo plain-text) *indent*)))) + (fill-string (string-concatenate strings) + #:line-width (%text-width) #:initial-indent indent + #:subsequent-indent indent)))) + +(define (texi->plain-text str) + "Return a plain-text representation of texinfo fragment STR." + (stexi->plain-text (texi-fragment->stexi str))) + +(define (package-description-string package) + "Return a plain-text representation of PACKAGE description field." + (and=> (package-description package) + (compose texi->plain-text P_))) + (define (string->recutils str) "Return a version of STR where newlines have been replaced by newlines followed by \"+ \", which makes for a valid multi-line field value in the @@ -787,18 +814,9 @@ followed by \"+ \", which makes for a valid multi-line field value in the '() str))) -(define* (package->recutils p port - #:optional (width (or (and=> (getenv "WIDTH") - string->number) - 80))) +(define* (package->recutils p port #:optional (width (%text-width))) "Write to PORT a `recutils' record of package P, arranging to fit within WIDTH columns." - (define (description->recutils str) - (let ((str (P_ str))) - (string->recutils - (fill-paragraph str width - (string-length "description: "))))) - (define (dependencies->recutils packages) (let ((list (string-join (map package-full-name (sort packages package (package-synopsis p) P_) ""))) - (format port "description: ~a~%" - (and=> (package-description p) description->recutils)) - (newline port)) + (format port "~a~2%" + (string->recutils + (string-trim-right + (parameterize ((%text-width width)) + (texi->plain-text + (string-append "description: " + (or (and=> (package-description p) P_) + "")))) + #\newline)))) (define (string->generations str) "Return the list of generations matching a pattern in STR. This function -- cgit 1.4.1