unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* WIP gnu: poetry: Update to 1.0.3.
@ 2020-02-03 15:31 Tanguy Le Carrour
  2020-02-03 18:20 ` Gábor Boskovits
  2020-02-19 16:40 ` Tanguy Le Carrour
  0 siblings, 2 replies; 5+ messages in thread
From: Tanguy Le Carrour @ 2020-02-03 15:31 UTC (permalink / raw)
  To: Guix

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WIP gnu: poetry: Update to 1.0.3.
  2020-02-03 15:31 WIP gnu: poetry: Update to 1.0.3 Tanguy Le Carrour
@ 2020-02-03 18:20 ` Gábor Boskovits
  2020-02-04  8:48   ` Tanguy Le Carrour
  2020-02-19 16:40 ` Tanguy Le Carrour
  1 sibling, 1 reply; 5+ messages in thread
From: Gábor Boskovits @ 2020-02-03 18:20 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: Guix

Hello,

Tanguy Le Carrour <tanguy@bioneland.org> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WIP gnu: poetry: Update to 1.0.3.
  2020-02-03 18:20 ` Gábor Boskovits
@ 2020-02-04  8:48   ` Tanguy Le Carrour
  2020-02-05 17:13     ` Tanguy Le Carrour
  0 siblings, 1 reply; 5+ messages in thread
From: Tanguy Le Carrour @ 2020-02-04  8:48 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: Guix

Hi Gábor!


Le 02/03, Gábor Boskovits a écrit :
> Tanguy Le Carrour <tanguy@bioneland.org> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WIP gnu: poetry: Update to 1.0.3.
  2020-02-04  8:48   ` Tanguy Le Carrour
@ 2020-02-05 17:13     ` Tanguy Le Carrour
  0 siblings, 0 replies; 5+ messages in thread
From: Tanguy Le Carrour @ 2020-02-05 17:13 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: Guix

Hi Gui, hi Gábor!

Le 02/04, Tanguy Le Carrour a écrit :
> Le 02/03, Gábor Boskovits a écrit :
> > Tanguy Le Carrour <tanguy@bioneland.org> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WIP gnu: poetry: Update to 1.0.3.
  2020-02-03 15:31 WIP gnu: poetry: Update to 1.0.3 Tanguy Le Carrour
  2020-02-03 18:20 ` Gábor Boskovits
@ 2020-02-19 16:40 ` Tanguy Le Carrour
  1 sibling, 0 replies; 5+ messages in thread
From: Tanguy Le Carrour @ 2020-02-19 16:40 UTC (permalink / raw)
  To: Guix

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-19 16:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-03 15:31 WIP gnu: poetry: Update to 1.0.3 Tanguy Le Carrour
2020-02-03 18:20 ` Gábor Boskovits
2020-02-04  8:48   ` Tanguy Le Carrour
2020-02-05 17:13     ` Tanguy Le Carrour
2020-02-19 16:40 ` Tanguy Le Carrour

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).