From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: [PATCH 2/2] gnu: Add python-lzo. Date: Sun, 5 Feb 2017 11:37:40 +0000 Message-ID: <20170205113740.wluulgh5yzrhauvm@wasp> References: <20170202151605.27876-1-contact.ng0@cryptolab.net> <20170202151605.27876-3-contact.ng0@cryptolab.net> <87r33d7zmh.fsf@gmail.com> 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]:48130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caL7A-0001z8-FO for guix-devel@gnu.org; Sun, 05 Feb 2017 06:36:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caL77-0001Oq-CY for guix-devel@gnu.org; Sun, 05 Feb 2017 06:36:16 -0500 Received: from latitanza.investici.org ([2001:888:2000:56::19]:28287) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1caL77-0001Oi-5l for guix-devel@gnu.org; Sun, 05 Feb 2017 06:36:13 -0500 Content-Disposition: inline In-Reply-To: <87r33d7zmh.fsf@gmail.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: Maxim Cournoyer Cc: guix-devel@gnu.org On 17-02-05 01:31:18, Maxim Cournoyer wrote: > Hi ng0, >=20 > contact.ng0@cryptolab.net writes: >=20 > > From: ng0 > > > > * gnu/packages/compression.scm (python-lzo): New variable. > > > > Co-authored-by: Danny Milosavljevic > > --- > > gnu/packages/compression.scm | 36 ++++++++++++++++++++++++++++++++++++ > > 1 file changed, 36 insertions(+) > > > > diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm > > index 64518fb6b..2545c4517 100644 > > --- a/gnu/packages/compression.scm > > +++ b/gnu/packages/compression.scm > > @@ -365,6 +365,42 @@ LZO is written in ANSI C. Both the source code an= d the compressed data > > format are designed to be portable across platforms.") > > (license license:gpl2+))) > > =20 > > +(define-public python-lzo > > + (package > > + (name "python-lzo") > > + (version "1.11") > > + (source > > + (origin > > + (method url-fetch) > > + (uri (pypi-uri "python-lzo" version)) > > + (sha256 > > + (base32 > > + "11p3ifg14p086byhhin6azx5svlkg8dzw2b5abixik97xd6fm81q")))) > > + (build-system python-build-system) > > + (arguments > > + `(#:test-target "check" > > + #:phases > > + (modify-phases %standard-phases > > + (add-after 'unpack 'patch-setuppy > > + (lambda _ > > + (substitute* "setup.py" > > + (("include_dirs.append.*") > > + (string-append "include_dirs.append(\"" > > + (assoc-ref %build-inputs "lzo") "/inclu= de/lzo" "\") > > +")))))))) >=20 > A bit hard to read/long line here. Maybe the various string components > being appended could be aligned below the string-append call? Also, you > could use single quotes for the Python code which might help to > differentiate what is what. It is already applied. I think "it's hard to read" is more than just a cosmetic fix, so if you have an idea how to make this more readable, feel free to send a patch. > Is the guix linter happy? >=20 > > + (inputs > > + `(("lzo" ,lzo))) > > + (home-page "https://github.com/jd-boyd/python-lzo") > > + (synopsis "Python bindings for the LZO data compression library") > > + (description > > + "Python-LZO provides Python bindings for LZO, i.e. you can access > > +the LZO library from your Python scripts thereby compressing ordinary > > +Python strings.") > > + (license license:gpl2+))) > > + > > +(define-public python2-lzo > > + (package-with-python2 python-lzo)) > > + > > (define-public lzop > > (package > > (name "lzop") >=20 > Otherwise these 2 patches LGTM! >=20 > Maxim --=20 ng0 -- https://www.inventati.org/patternsinthechaos/