From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH 09/16] gnu: Add python-entrypoints. Date: Tue, 1 Nov 2016 13:20:39 +0100 Message-ID: <20161101122046.751-10-ricardo.wurmus@mdc-berlin.de> References: <20161101122046.751-1-ricardo.wurmus@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Y57-0001xk-S3 for guix-devel@gnu.org; Tue, 01 Nov 2016 08:22:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1Y53-0003Qx-7q for guix-devel@gnu.org; Tue, 01 Nov 2016 08:22:21 -0400 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:45913) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1Y52-0003Qe-U7 for guix-devel@gnu.org; Tue, 01 Nov 2016 08:22:17 -0400 Received: from localhost (localhost [127.0.0.1]) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 0EFE0380DA0 for ; Tue, 1 Nov 2016 13:22:16 +0100 (CET) Received: from pegasus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (pegasus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cgYcEb0EHnZE for ; Tue, 1 Nov 2016 13:22:10 +0100 (CET) Received: from HTCAONE.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTPS for ; Tue, 1 Nov 2016 13:22:10 +0100 (CET) In-Reply-To: <20161101122046.751-1-ricardo.wurmus@mdc-berlin.de> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * 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: thomas@kluyver.me.uk +Classifier: License :: OSI Approved :: MIT License +" ,version))) + (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 +@code{console_scripts} 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") -- 2.10.1