From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH v2] gnu: Add python2-shedskin. Date: Wed, 30 Mar 2016 07:26:59 +0200 Message-ID: <20160330072659.794e2d16@scratchpost.org> References: <20160330002745.30a98f5c@scratchpost.org> <20160330004942.6a24c141@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1al8eq-00018a-Vs for guix-devel@gnu.org; Wed, 30 Mar 2016 01:27:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1al8en-0003sq-NG for guix-devel@gnu.org; Wed, 30 Mar 2016 01:27:08 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:36931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1al8en-0003sD-HB for guix-devel@gnu.org; Wed, 30 Mar 2016 01:27:05 -0400 Received: from localhost (91.141.2.33.wireless.dyn.drei.com [91.141.2.33]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 7A4951CA0ABC for ; Wed, 30 Mar 2016 07:27:03 +0200 (CEST) In-Reply-To: <20160330004942.6a24c141@scratchpost.org> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Patch that does the latter. Is that OK? * gnu/packages/python.scm (python2-shedskin): New variable. --- b/gnu/packages/python.scm | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 88aef9d..203aefc 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -37,7 +37,7 @@ (define-module (gnu packages python) #:use-module ((guix licenses) #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style - gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+ + gpl2 gpl2+ gpl3 gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+ isc mpl2.0 psfl public-domain repoze unlicense x11-style zpl2.1)) #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) @@ -76,6 +76,8 @@ #:use-module (gnu packages xdisorg) #:use-module (gnu packages zip) #:use-module (gnu packages tcl) + #:use-module (gnu packages bdw-gc) + #:use-module (gnu packages pcre) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -8490,3 +8492,35 @@ is made as zipfile like as possible.") (define-public python2-rarfile (package-with-python2 python-rarfile)) + +(define-public python2-shedskin + (package + (name "python2-shedskin") + (version "0.9.4") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/shedskin/shedskin/releases/download/v" version "/shedskin-0.9.4.tgz")) + (sha256 + (base32 + "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41")))) + (build-system python-build-system) + (arguments `(#:python ,python-2 + #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-resulting-include-libs + (lambda* (#:key inputs #:allow-other-keys) + (let ((libgc (assoc-ref inputs "libgc")) + (pcre (assoc-ref inputs "pcre"))) + (substitute* "shedskin/makefile.py" + (("variable == 'CCFLAGS':") + (string-append "variable == 'CCFLAGS':\n line += ' -I " pcre "/include -I " libgc "/include'")) + (("variable == 'LFLAGS':") + (string-append "variable == 'LFLAGS':\n line += ' -L" pcre "/lib -L " libgc "/lib'"))) + #t)))))) + (native-inputs `(("python2-setuptools" ,python2-setuptools))) + (inputs `(("pcre" ,pcre) + ("libgc" ,libgc))) + (home-page "https://shedskin.github.io/") + (synopsis "Python Native Compiler") + (description "This is a native compiler for a subset of Python. It generates C++ code and a Makefile.") + (license (list gpl3 bsd-3 expat))))