guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] gnu: Add python-lzo.


From: ng0
Subject: Re: [PATCH 2/2] gnu: Add python-lzo.
Date: Fri, 03 Feb 2017 13:13:20 +0000

Hartmut Goebel writes:

> Am 02.02.2017 um 16:16 schrieb address@hidden:
>> +                (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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]