From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH 09/16] gnu: Add python-entrypoints. Date: Fri, 04 Nov 2016 17:54:00 +0100 Message-ID: <87d1ib9oev.fsf@elephly.net> References: <20161101122046.751-1-ricardo.wurmus@mdc-berlin.de> <20161101122046.751-10-ricardo.wurmus@mdc-berlin.de> <76ac69b7-fc3c-2701-9348-bb64a66f5cc5@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2hks-0008Ih-23 for guix-devel@gnu.org; Fri, 04 Nov 2016 12:54:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2hkp-00063O-08 for guix-devel@gnu.org; Fri, 04 Nov 2016 12:54:14 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:21304) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2hko-0005vP-NY for guix-devel@gnu.org; Fri, 04 Nov 2016 12:54:10 -0400 In-reply-to: <76ac69b7-fc3c-2701-9348-bb64a66f5cc5@crazy-compilers.com> 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: Hartmut Goebel Cc: guix-devel@gnu.org Hartmut Goebel writes: > Am 01.11.2016 um 13:20 schrieb Ricardo Wurmus: >> + (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)))))) > > Instread of this I recommend adding a minimal setup.py and let the > build-system do the job. This would be more future proof. That’s a good idea. I did this and it really simplified the patch a lot. Thanks! ~~ Ricardo