Re: WIP gnu: poetry: Update to 1.0.3.

2020-02-19 Thread Tanguy Le Carrour
Hi Guix,

Here is an update on my work to update Poetry to version 1.0.3.

I have a working version that I've been using for 2 weeks, but I had to
"downgrade" some requirements to make it work:

```
(substitute* "setup.py"
  (("pexpect>=4.7.0,<5.0.0") "pexpect>=4.6.0,<5.0.0")
  (("jsonschema>=3.1,<4.0") "jsonschema>=3.0.0,<4.0")
  (("cachy>=0.3.0,<0.4.0") "cachy>=0.2.0,<0.4.0")
```

When I try to update those packages, I get various errors that I'm
working on… OK… that I should have been working on! But working on updating
gnunet was more fun! :-)

So, should I wait for those 3 packages to have been updated before
submitting my poetry patch, or can I leave those requirements
"downgraded" and submit it anyway (postponing the update of the dependencies)?

Regards

-- 
Tanguy



Re: WIP gnu: poetry: Update to 1.0.3.

2020-02-05 Thread Tanguy Le Carrour
Hi Gui, hi Gábor!

Le 02/04, Tanguy Le Carrour a écrit :
> Le 02/03, Gábor Boskovits a écrit :
> > Tanguy Le Carrour  ezt írta (időpont: 2020.
> > febr. 3., H, 16:31):
> > > I'm working on updating Poetry to version 1.0.3 and I have a problem
> > > with the version of a dependency.
> > >
> […]
> > > [1]: attempt to patch setup.py
> > > -(arguments `(#:tests? #f)); tests depend on dbus 
> > > service
> > > +(arguments
> > > + `(#:tests? #f ;; Pypi does not have tests.
> > > +   #:phases
> > > +   (modify-phases %standard-phases
> > > + (add-after 'unpack 'change-dependencies
> > > +   (lambda _
> > > + ;; Guix has version 21.0.0 of python-keyring
> > > + (invoke "sed" "-i" "-e"
> > > + "s/keyring>=20.0.1,<21.0.0/keyring>=20.0.1,<22.0.0/"
> > > + "setup.py")
> > > + #t)
> > >
> >
> > What did not work in this case?
> The `setup.py` file was not modified!
> > Also, do you think that you could replace invoke sed with substitute*?
>
> I'll definitively give it a try! Thanks!

This worked perfectly! Thanks!

I've just submitted the first 3 patches (trivial updates) required to update
Poetry, but I'm still struggling with the update of python-cachy. I've a
`fakeredis: unable to find libc or equivalent` error, so for the time
being, I deactivated the tests.

I might have to start a new thread on guix-devel, if I fail to figure out
a way to make it work.

I'll also have to work on my commit message for poetry as quite a lot is
happening:

```
WIP gnu: poetry: Update to 1.0.3.

* gnu/packages/python-xyz.scm (poetry): Update to 1.0.3.
[propagated-inputs] remove python-glob2, add python-clikit,
add python-importlib-metadata, remove python-msgpack, remove
python-pathlib2, add python-keyring.
[home-page] update URL.
[arguments/#:phases/modify-phases] remove patch.
```


Thanks again for your help!

-- 
Tanguy



Re: WIP gnu: poetry: Update to 1.0.3.

2020-02-04 Thread Tanguy Le Carrour
Hi Gábor!


Le 02/03, Gábor Boskovits a écrit :
> Tanguy Le Carrour  ezt írta (időpont: 2020.
> febr. 3., H, 16:31):
> > I'm working on updating Poetry to version 1.0.3 and I have a problem
> > with the version of a dependency.
> >
> > Poetry now depends on python-keyring >=20.0.0,<21.0.0. In Guix we
> > have python-keyring 21.0.0, so it does not work once installed!
> >
> > What am I supposed to do?
> >
> > I see 3 different ways out of this:
> > - patch the package to make it use our version (I tried but failed [1]);
> > - ask upstream to update dependencies;
> > - declare a new package python-keyring-20.0.0 and use it as an input.
> 
> Asking upstream to update would be great.

As describe here [1][], it might be a little bit "thornier" than that,
as keyring v21.0.0 depends on Python 3.6! :-(

[1]: https://github.com/python-poetry/poetry/issues/1832

So I guess I'll try to patch the code…


> > [1]: attempt to patch setup.py
> > -(arguments `(#:tests? #f)); tests depend on dbus 
> > service
> > +(arguments
> > + `(#:tests? #f ;; Pypi does not have tests.
> > +   #:phases
> > +   (modify-phases %standard-phases
> > + (add-after 'unpack 'change-dependencies
> > +   (lambda _
> > + ;; Guix has version 21.0.0 of python-keyring
> > + (invoke "sed" "-i" "-e"
> > + "s/keyring>=20.0.1,<21.0.0/keyring>=20.0.1,<22.0.0/"
> > + "setup.py")
> > + #t)
> >
> 
> What did not work in this case?

The `setup.py` file was not modified!


> Also, do you think that you could replace invoke sed with substitute*?

I'll definitively give it a try! Thanks!


Regards

-- 
Tanguy



Re: WIP gnu: poetry: Update to 1.0.3.

2020-02-03 Thread Gábor Boskovits
Hello,

Tanguy Le Carrour  ezt írta (időpont: 2020.
febr. 3., H, 16:31):
>
> Dear Guix,
>
> I'm working on updating Poetry to version 1.0.3 and I have a problem
> with the version of a dependency.
>
> Poetry now depends on python-keyring >=20.0.0,<21.0.0. In Guix we
> have python-keyring 21.0.0, so it does not work once installed!
>
> What am I supposed to do?
>
> I see 3 different ways out of this:
> - patch the package to make it use our version (I tried but failed [1]);
> - ask upstream to update dependencies;
> - declare a new package python-keyring-20.0.0 and use it as an input.

Asking upstream to update would be great.

>
> [1]: attempt to patch setup.py
> -(arguments `(#:tests? #f)); tests depend on dbus 
> service
> +(arguments
> + `(#:tests? #f ;; Pypi does not have tests.
> +   #:phases
> +   (modify-phases %standard-phases
> + (add-after 'unpack 'change-dependencies
> +   (lambda _
> + ;; Guix has version 21.0.0 of python-keyring
> + (invoke "sed" "-i" "-e"
> + "s/keyring>=20.0.1,<21.0.0/keyring>=20.0.1,<22.0.0/"
> + "setup.py")
> + #t)
>

What did not work in this case?
Also, do you think that you could replace invoke sed with substitute*?

> Any help welcome!
>
> --
> Tanguy
>

Best regards,
g_bor
-- 
OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21



WIP gnu: poetry: Update to 1.0.3.

2020-02-03 Thread Tanguy Le Carrour
Dear Guix,

I'm working on updating Poetry to version 1.0.3 and I have a problem
with the version of a dependency.

Poetry now depends on python-keyring >=20.0.0,<21.0.0. In Guix we
have python-keyring 21.0.0, so it does not work once installed!

What am I supposed to do?

I see 3 different ways out of this:
- patch the package to make it use our version (I tried but failed [1]);
- ask upstream to update dependencies;
- declare a new package python-keyring-20.0.0 and use it as an input.

[1]: attempt to patch setup.py
-(arguments `(#:tests? #f)); tests depend on dbus 
service
+(arguments
+ `(#:tests? #f ;; Pypi does not have tests.
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'change-dependencies
+   (lambda _
+ ;; Guix has version 21.0.0 of python-keyring
+ (invoke "sed" "-i" "-e"
+ "s/keyring>=20.0.1,<21.0.0/keyring>=20.0.1,<22.0.0/"
+ "setup.py")
+ #t)

Any help welcome!

-- 
Tanguy