Subject: bug#26401: [PATCH] python-tryton (with no modules)

From: Arun Isaac <[email-masked]>
Date: Tue, 16 May 2017 22:42:59 +0530

>> GNU Health usually lags behind the latest Tryon, and currently runs on
>> Tryton 3.8. We will have to create a package for Tryton 3.8 as
>> well. This can just inherit from the latest tryton package, and modify
>> only the `version' and `source' fields. Could you do this?
>
> Yes, I think I could do it.  Bt if you don't mind I'd liie to delay
> this.

Sure!

tryton, and tryton related packages (especially the server side modules,
GNU Health, etc.) are numerous and complicated enough to deserve their
own separate file. You can put them in gnu/packages/tryton.scm.

> No, the current tarball is not suficient.  Genshi builds with python
> 3.3 only. With python 3.4 and 3.5 it doesn't build.
>
> This is mainly due to a change in thhe C API so a part of Genshi tat was
> written in C has to be re-written adgering to the new API
>
> The authors claim to need more time to do this.
>
> The Genshi issue tracker reports all this infomration, I linked the
> relevant issues in the comments
>
> Admittedly I don't understand what these patches do. They're too entrenched
> in the Genshi code base
>
> I shamelessly copied them from the Fedora package definition
> See here
> http://pkgs.fedoraproject.org/cgit/rpms/python-genshi.git/snapshot/python-genshi-f25.tar.gz
>
> I understand that they made an effort to make their Genshi package
> compatible with pythhon 3.4 too and that is not necessary or Guix
>
> But it's too complicated for me to excise the support for python 3.4

For all practical purposes, I think it's best to assume that there is no
python3 genshi package. Instead, we should simply package
python2-genshi, and let the authors fix their python3 package. In any
case, tryton needs only python2-genshi. So, there is no urgent need for
the python3 genshi package. I guess, this also means that there will be
no python3 relatorio package.

>> > +    (arguments
>> > +     `(#:phases
>> > +       (modify-phases %standard-phases
>> > +         (add-before 'check 'preparations
>> > +                     (lambda* _

Since you're not using any of `lambda*' features, you can just use `lambda' here.

>> > +                       ;; this is used in the tests
>> > +                       (setenv "DB_NAME" ":memory:"))))))
>>
>> Though this is shorter, I think it would be clearer to replace the
>> `check' phase altogether.
>
> mmm I'm not sure I can do this.
> I don't know much about setuptools, eggs and the such
> The check phase of the python build system is quite articulated, I don't
> feel like messing with it
>
> Feel free to rearrange this yourself as you see fit.

Actually, this is not a big deal. We'll leave it as it is. If necessary,
I'll fix it before pushing.

> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 57a67de41..f1ef53e1a 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -14622,3 +14622,25 @@ substitute for redis.")
>
>  (define-public python2-fakeredis
>    (package-with-python2 python-fakeredis))
> +
> +(define-public python-sql
> +  (package
> +    (name "python-sql")
> +    (version "0.8")
> +    (source
> +     (origin
> +       (method url-fetch)

...

> +       (uri (pypi-uri
> +             "python-sql"
> +             version))

Could you put these on the same line?

> +;; this package depends on python-genshi that
> +;; can be buit only with python-2
> +;; so providing a python33 version of this
> +;; is difficult
> +(define-public python2-relatorio
> +  (package
> +    (name "python-relatorio")
> +    (version "0.6.4")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "relatorio" version))
> +       (sha256
> +        (base32
> +         "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
> +    (propagated-inputs
> +     `(("lxml" ,python2-lxml)
> +       ("genshi" ,python2-genshi)))

Use full names here, including the python version in the package name. I
mean the full name of "lxml" is "python2-lxml", not "python-lxml". Make
similar changes wherever applicable.

Also, in several places, there was a typo saying "pyton" instead of
"python". Please fix those.

> From b71cd2bd664e530dfabb3e558db15934f0ec204a Mon Sep 17 00:00:00 2001
> From: humanitiesNerd <[email-masked]>
> Date: Thu, 6 Apr 2017 09:37:59 +0200
> Subject: [PATCH 4/5] gnu: Add python-trytond.
>
> * gnu/packages/python.scm (python-trytond, python2-trytond): New variables.

Change this commit message replacing python-trytond with trytond as
discussed earlier. Make a similar change for the commit message
involving python-tryton (the client).