From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH v3] gnu: Add python2-shedskin. Date: Thu, 7 Apr 2016 14:13:24 +0200 Message-ID: <20160407141324.0cc1160b@scratchpost.org> References: <20160330002745.30a98f5c@scratchpost.org> <20160330004942.6a24c141@scratchpost.org> <20160330072659.794e2d16@scratchpost.org> <20160406221909.GB8974@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao8oZ-0003JT-27 for guix-devel@gnu.org; Thu, 07 Apr 2016 08:13:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ao8oT-0000JH-4e for guix-devel@gnu.org; Thu, 07 Apr 2016 08:13:34 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:43718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao8oS-0000Ic-RN for guix-devel@gnu.org; Thu, 07 Apr 2016 08:13:29 -0400 In-Reply-To: <20160406221909.GB8974@jasmine> 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: Leo Famulari Cc: guix-devel@gnu.org On Wed, 6 Apr 2016 18:19:09 -0400 Leo Famulari wrote: > On Wed, Mar 30, 2016 at 07:26:59AM +0200, Danny Milosavljevic wrote: > > Patch that does the latter. Is that OK? =20 >=20 > If it works, then I think it's better than propagating pcre and libgc. It does work.=20 However, shedskin creates C++ source files and a Makefile. The user then ha= s to manually compile them via "make". So you have to have make and g++ installed in your profile in order to be a= ble to actually have a native executable. Now it refers to the libgc and pcre that shedskin used while it was install= ed, so you don't have to install those. Not sure whether that's better than having the profile contain pcre and lib= gc, though. > The home page says that it works with python 2.4 =E2=80=93 2.6. Is that a > problem? We don't package any versions within that range. I tested it with Python 2.7.10, it works fine. With Python 3 it doesn't wor= k. To try it, create empty directory, write a python program "blahblah.py" ins= ide, then $ shedskin blahblah.py $ make You'll end up with an executable "blahblah". > Is the 'examples' directory included in the package when installed? No. Should it? > If so, those files have some more licenses that should be listed. > Can you send a revised patch, making sure to satisfy `./pre-inst-env guix > lint shedskin` before sending? diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 25bed2a..bdb164f 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 x1= 1-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 x= 11-style zpl2.1)) #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) @@ -8660,3 +8660,41 @@ LDFLAGS and parse the output to build extensions wit= h setup.py.") (define-public python2-pkgconfig (package-with-python2 python-pkgconfig)) =20 +(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-" version ".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 =3D=3D 'CCFLAGS':[ ]*") + (string-append "variable =3D=3D 'CCFLAGS':\n" + " line +=3D ' -I "= pcre "/include" + " -I " libgc "/include'")) + (("variable =3D=3D 'LFLAGS':[ ]*") + (string-append "variable =3D=3D 'LFLAGS':\n" + " line +=3D ' -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 "Experimental Python-2 to C++ Compiler") + (description (string-append "This is an experimental compiler for a subs= et of Python." + " It generates C++ code and a Makefile.")) + (license (list license:gpl3 license:bsd-3 license:expat))))