[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/16] gnu: Add python-entrypoints.
From: |
Roel Janssen |
Subject: |
Re: [PATCH 09/16] gnu: Add python-entrypoints. |
Date: |
Tue, 01 Nov 2016 17:18:18 +0100 |
User-agent: |
mu4e 0.9.17; emacs 25.1.1 |
Ricardo Wurmus writes:
> * gnu/packages/python.scm (python-entrypoints, python2-entrypoints): New
> variables.
> ---
> gnu/packages/python.scm | 55
> +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index a2d3d3c..621c4d0 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -6719,6 +6719,61 @@ Jupyter Notebook format and Python APIs for working
> with notebooks.")
> (define-public python2-bleach
> (package-with-python2 python-bleach))
>
> +(define-public python-entrypoints
> + (package
> + (name "python-entrypoints")
> + (version "0.2.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> "https://github.com/takluyver/entrypoints/archive/"
> + version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
> + (build-system python-build-system)
> + ;; The package does not come with a setup.py file, so we have to install
> + ;; the file along with a custom egg-info file.
> + (arguments
> + `(#:tests? #f
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'build)
> + (replace 'install
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (python-version ((@@ (guix build python-build-system)
> + get-python-version)
> + (assoc-ref inputs "python")))
> + (target (string-append out "/lib/python" python-version
> + "/site-packages/")))
> + (mkdir-p target)
> + (call-with-output-file (string-append target
> "entrypoints.egg-info")
> + (lambda (port)
> + (format port "\
> +Metadata-Version: 1.1
> +Name: entrypoints
> +Version: ~a
> +Summary: Discover and load entry points from installed packages
> +Author: Thomas Kluyver
> +Author-email: address@hidden
> +Classifier: License :: OSI Approved :: MIT License
> +" ,version)))
I wonder if this would be nicer to do in a separate patch..
> + (install-file "entrypoints.py" target)
> + #t))))))
> + (home-page "https://github.com/takluyver/entrypoints")
> + (synopsis "Discover and load entry points from installed Python
> packages")
> + (description "Entry points are a way for Python packages to advertise
> +objects with some common interface. The most common examples are
> address@hidden entry points, which define shell commands by
> +identifying a Python function to run. The @code{entrypoints} module contains
> +functions to find and load entry points.")
> + (license license:expat)))
> +
> +(define-public python2-entrypoints
> + (package-with-python2 python-entrypoints))
> +
> (define-public python-chardet
> (package
> (name "python-chardet")
LGTM!
Kind regards,
Roel Janssen
- Re: [PATCH 07/16] gnu: Add python-nbformat., (continued)
- [PATCH 09/16] gnu: Add python-entrypoints., Ricardo Wurmus, 2016/11/01
- [PATCH 10/16] gnu: Add python-nbconvert., Ricardo Wurmus, 2016/11/01
- [PATCH 11/16] gnu: Add python-notebook., Ricardo Wurmus, 2016/11/01
- [PATCH 12/16] gnu: Add python-widgetsnbextension., Ricardo Wurmus, 2016/11/01
- [PATCH 13/16] gnu: Add python-ipywidgets., Ricardo Wurmus, 2016/11/01