mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 14:16:55 -05:00
gnu: python: Add package python-wrapper.
* gnu/packages/python.scm (python-wrapper): New variable.
This commit is contained in:
parent
b24d1cfc85
commit
898238b9f5
1 changed files with 27 additions and 1 deletions
|
@ -29,7 +29,8 @@ (define-module (gnu packages python)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix build-system python))
|
#:use-module (guix build-system python)
|
||||||
|
#:use-module (guix build-system trivial))
|
||||||
|
|
||||||
(define-public python-2
|
(define-public python-2
|
||||||
(package
|
(package
|
||||||
|
@ -167,6 +168,31 @@ (define-public python
|
||||||
(variable "PYTHONPATH")
|
(variable "PYTHONPATH")
|
||||||
(directories '("lib/python3.3/site-packages")))))))
|
(directories '("lib/python3.3/site-packages")))))))
|
||||||
|
|
||||||
|
(define-public python-wrapper
|
||||||
|
(package (inherit python)
|
||||||
|
(name "python-wrapper")
|
||||||
|
(source #f)
|
||||||
|
(build-system trivial-build-system)
|
||||||
|
(inputs `(("python" ,python)))
|
||||||
|
(arguments
|
||||||
|
`(#:modules ((guix build utils))
|
||||||
|
#:builder
|
||||||
|
(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
|
||||||
|
(python (string-append (assoc-ref %build-inputs "python") "/bin/")))
|
||||||
|
(mkdir-p bin)
|
||||||
|
(for-each
|
||||||
|
(lambda (old new)
|
||||||
|
(symlink (string-append python old)
|
||||||
|
(string-append bin "/" new)))
|
||||||
|
`("python3", "pydoc3", "idle3")
|
||||||
|
`("python", "pydoc", "idle"))))))
|
||||||
|
(description (string-append (package-description python)
|
||||||
|
"\n\nThis wrapper package provides symbolic links to the python binaries
|
||||||
|
without version suffix."))))
|
||||||
|
|
||||||
|
|
||||||
(define-public pytz
|
(define-public pytz
|
||||||
(package
|
(package
|
||||||
(name "pytz")
|
(name "pytz")
|
||||||
|
|
Loading…
Reference in a new issue