summaryrefslogtreecommitdiff
path: root/guix/import/pypi.scm
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2014-10-16 00:42:51 +0200
committerCyril Roelandt <tipecaml@gmail.com>2014-10-22 02:47:29 +0200
commita5ffa812b8cb01f5904e587ed629960902004654 (patch)
tree1156f1b7c644e632747901498756d80703051b87 /guix/import/pypi.scm
parentcf690129b4e4ea130d9b890b51fa096fae3ce250 (diff)
guix import pypi: do not add "python-" to a package name if it's already there.
* guix/import/pypi.scm (make-pypi-sexp): test whether the package name starts with "python-" before modifying it.
Diffstat (limited to 'guix/import/pypi.scm')
-rw-r--r--guix/import/pypi.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 8f5e031f47..a0b3eb5a7b 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -134,7 +134,9 @@ underscores."
"Return the `package' s-expression for a python package with the given NAME,
VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
`(package
- (name ,(string-append "python-" (snake-case name)))
+ (name ,(if (string-prefix? "python-" name)
+ (snake-case name)
+ (string-append "python-" (snake-case name))))
(version ,version)
(source (origin
(method url-fetch)