* [bug#45003] [PATCH] gnu: poetry: Fix a problem with a dependency.
@ 2020-12-02 8:33 Tanguy Le Carrour
2020-12-03 21:47 ` bug#45003: " Marius Bakke
0 siblings, 1 reply; 4+ messages in thread
From: Tanguy Le Carrour @ 2020-12-02 8:33 UTC (permalink / raw)
To: 45003; +Cc: Tanguy Le Carrour
* gnu/packages/python-xyz.scm (poetry)[arguments]: Relax version constraints
for python-packaging.
---
gnu/packages/python-xyz.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bffb643258..67447bdfa5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13227,7 +13227,10 @@ compatible build front-ends to build Poetry managed projects.")
(substitute* "setup.py"
;; Newer versions of keyring produce a package with version "0.0.0"
;; Reported upstream: <https://github.com/jaraco/keyring/issues/469>
- (("keyring>=21.2.0,<22.0.0") "keyring>=21.0.0,<22.0.0"))
+ (("keyring>=21.2.0,<22.0.0") "keyring>=21.0.0,<22.0.0")
+ ;; TODO: remove after the next release cycle,
+ ;; when packaging has been updated.
+ (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
#t)))))
(propagated-inputs
`(("python-cachecontrol" ,python-cachecontrol)
--
2.29.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#45003: [PATCH] gnu: poetry: Fix a problem with a dependency.
2020-12-02 8:33 [bug#45003] [PATCH] gnu: poetry: Fix a problem with a dependency Tanguy Le Carrour
@ 2020-12-03 21:47 ` Marius Bakke
2020-12-04 7:23 ` [bug#45003] " Tanguy LE CARROUR
2020-12-04 7:35 ` Tanguy LE CARROUR
0 siblings, 2 replies; 4+ messages in thread
From: Marius Bakke @ 2020-12-03 21:47 UTC (permalink / raw)
To: Tanguy Le Carrour, 45003-done; +Cc: Tanguy Le Carrour
[-- Attachment #1.1: Type: text/plain, Size: 200 bytes --]
Tanguy Le Carrour <tanguy@bioneland.org> skriver:
> * gnu/packages/python-xyz.scm (poetry)[arguments]: Relax version constraints
> for python-packaging.
Applied, thanks!
Note: I tried to do this:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: diff --]
[-- Type: text/x-patch, Size: 2874 bytes --]
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bffb643258..ce4695a956 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16003,17 +16003,15 @@ several utilities, as well as an API for building localization tools.")
(define-public python-packaging
(package
(name "python-packaging")
- (version "20.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "packaging" version))
- ;; XXX: The URL in the patch file is wrong, it should be
- ;; <https://github.com/pypa/packaging/pull/256>.
- (patches (search-patches "python-packaging-test-arch.patch"))
- (sha256
- (base32
- "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
+ ;; Note: when updating this, be careful not to change the 'bootstrap'
+ ;; variant below, which can only be updated on 'core-updates'.
+ (version "20.4")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "packaging" version))
+ (sha256
+ (base32
+ "1y3rc1ams1i25calk6b9jf1gl85ix5a23a146swjvhdr8x7zfms3"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -16046,25 +16044,26 @@ information.")
;; Variants with minimal dependencies, for bootstrapping Pytest.
(define-public python-packaging-bootstrap
(hidden-package
- (package/inherit
- python-packaging
- (name "python-packaging-bootstrap")
- (native-inputs '())
- (propagated-inputs
- `(("python-pyparsing" ,python-pyparsing)))
- (arguments '(#:tests? #f)))))
+ (package
+ (inherit python-packaging)
+ (version "20.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "packaging" version))
+ ;; XXX: The URL in the patch file is wrong, it should be
+ ;; <https://github.com/pypa/packaging/pull/256>.
+ (patches (search-patches "python-packaging-test-arch.patch"))
+ (sha256
+ (base32
+ "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
+ (name "python-packaging-bootstrap")
+ (native-inputs '())
+ (propagated-inputs
+ `(("python-pyparsing" ,python-pyparsing)))
+ (arguments '(#:tests? #f)))))
(define-public python2-packaging-bootstrap
- (hidden-package
- (package/inherit
- python2-packaging
- (name "python2-packaging-bootstrap")
- (native-inputs '())
- (propagated-inputs
- `(("python-pyparsing" ,python2-pyparsing)))
- (arguments
- `(#:tests? #f
- ,@(package-arguments python2-packaging))))))
+ (package-with-python2 python-packaging-bootstrap))
(define-public python-relatorio
(package
[-- Attachment #1.3: Type: text/plain, Size: 611 bytes --]
But the test suite actually picks the 'python-packaging' that is
propagated from 'pytest', and promptly fails.
Updating packaging alone is also a staging-level change, so I did not
dig much further. But there is some room for improvement here. Maybe
by (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH"))) ?
I also wonder whether pytest needs to propagate packaging at all, or if
wrapping is enough. Do you know how common it is to "import pytest" or
"from pytest import foo", and whether those code paths would need
'packaging'?
Anyway, future problems! Thanks for maintaining Poetry. :-)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#45003] [PATCH] gnu: poetry: Fix a problem with a dependency.
2020-12-03 21:47 ` bug#45003: " Marius Bakke
@ 2020-12-04 7:23 ` Tanguy LE CARROUR
2020-12-04 7:35 ` Tanguy LE CARROUR
1 sibling, 0 replies; 4+ messages in thread
From: Tanguy LE CARROUR @ 2020-12-04 7:23 UTC (permalink / raw)
To: 45003-done, Marius Bakke
Hi Marius!
Excerpts from Marius Bakke's message of December 3, 2020 10:47 pm:
> Tanguy Le Carrour <tanguy@bioneland.org> skriver:
>
>> * gnu/packages/python-xyz.scm (poetry)[arguments]: Relax version constraints
>> for python-packaging.
>
> Applied, thanks!
Thanks!
> Note: I tried to do this:
> […]
> But the test suite actually picks the 'python-packaging' that is
> propagated from 'pytest', and promptly fails.
>
> Updating packaging alone is also a staging-level change, so I did not
> dig much further. But there is some room for improvement here. Maybe
> by (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH"))) ?
>
> I also wonder whether pytest needs to propagate packaging at all, or if
> wrapping is enough. Do you know how common it is to "import pytest" or
> "from pytest import foo", and whether those code paths would need
> 'packaging'?
>
> Anyway, future problems! Thanks for maintaining Poetry. :-)
I would hardly call it "maintaining"! It's been more like a struggle! ^_^'
Now that the situation has (hopefully) stabilized, I can spend some time
on the "poetry build system".
Thank you again for your precious help and your time!
--
Tanguy
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#45003] [PATCH] gnu: poetry: Fix a problem with a dependency.
2020-12-03 21:47 ` bug#45003: " Marius Bakke
2020-12-04 7:23 ` [bug#45003] " Tanguy LE CARROUR
@ 2020-12-04 7:35 ` Tanguy LE CARROUR
1 sibling, 0 replies; 4+ messages in thread
From: Tanguy LE CARROUR @ 2020-12-04 7:35 UTC (permalink / raw)
To: 45003-done, Marius Bakke
*Oups*, I sent my message to quickly…
Excerpts from Marius Bakke's message of December 3, 2020 10:47 pm:
> Updating packaging alone is also a staging-level change, so I did not
> dig much further. But there is some room for improvement here. Maybe
> by (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH"))) ?
Actually, I noticed some weird things when using Poetry, that might be
related to PYTHONPATH. Even if it was installed in its own profile, it
was using python packages installed outside of it. Can't remember for
sure, but I think it was `virtualenv`.
I had to unset my PYTHONPATH to make it use the ones installed in the profile.
But, now that the versions are the same in the default profile and in
this dedicated Poetry profile, everything seems to be working just fine.
> I also wonder whether pytest needs to propagate packaging at all, or if
> wrapping is enough. Do you know how common it is to "import pytest" or
> "from pytest import foo", and whether those code paths would need
> 'packaging'?
Usually, one would only do this in the test suite, or in a package that
extends pytest behaviour. At least it's what I see from the 450,942 results
I've found on Github. But I have to confess that I did not go through
all of them! ^_^'
Regards
--
Tanguy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-04 7:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-02 8:33 [bug#45003] [PATCH] gnu: poetry: Fix a problem with a dependency Tanguy Le Carrour
2020-12-03 21:47 ` bug#45003: " Marius Bakke
2020-12-04 7:23 ` [bug#45003] " Tanguy LE CARROUR
2020-12-04 7:35 ` Tanguy LE CARROUR
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.