From mboxrd@z Thu Jan 1 00:00:00 1970 From: "ng0" Subject: Re: [PATCH 2/2] gnu: Add python-lzo. Date: Fri, 03 Feb 2017 13:13:20 +0000 Message-ID: <87fujvh0y7.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> References: <20170202151605.27876-1-contact.ng0@cryptolab.net> <20170202151605.27876-3-contact.ng0@cryptolab.net> <58939758.9020507@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZdeq-0005DU-6A for guix-devel@gnu.org; Fri, 03 Feb 2017 08:12:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZden-00021f-1O for guix-devel@gnu.org; Fri, 03 Feb 2017 08:12:08 -0500 Received: from latitanza.investici.org ([2001:888:2000:56::19]:52708) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZdem-0001zE-NK for guix-devel@gnu.org; Fri, 03 Feb 2017 08:12:04 -0500 In-reply-to: <58939758.9020507@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 >> guix-devel" Hartmut Goebel writes: > Am 02.02.2017 um 16:16 schrieb contact.ng0@cryptolab.net: >> + (string-append "include_dirs.append(\"" >> + (assoc-ref %build-inputs "lzo") "/include/lzo" "\") > > You could use single quotes for teh python string to make it more readable: I think there was a reason for the way it was written. Your suggestion below makes the substitute fail with: ERROR: In procedure primitive-load-path: ERROR: In procedure scm_lreadr: gnu/packages/compression.scm:387:44: illegal character in escape sequence: #\) > > string-append "include_dirs.append('" + (assoc-ref %build-inputs "lzo") > "/include/lzo" "') > > >> +")))))))) > > Also this line-break is confusing. I suggest either using "\n" or to > change the substitute into something like: > > > + (substitute* "setup.py" > + (("include_dirs.append\(.*\)") ;; match up to the trailing parent only, not the new-line > + (string-append "include_dirs.append('" > + (assoc-ref %build-inputs "lzo") "/include/lzo" > + "')")))))))) ;; put these last few characters on the next line > > Otherwise LGTM. -- ng0 . https://www.inventati.org/patternsinthechaos/