* bug#40029: Preventing automatic python2 transformation of some packages
@ 2020-03-11 18:29 Marius Bakke
2020-03-12 12:19 ` Leo Prikler
2020-03-12 13:04 ` Ludovic Courtès
0 siblings, 2 replies; 4+ messages in thread
From: Marius Bakke @ 2020-03-11 18:29 UTC (permalink / raw)
To: 40029
[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]
Guix,
'python2-sphinx' is obsolete and increasingly a maintenance burden,
because we need to keep special versions around just to make it build.
The only reason we have this package is because it gets pulled in
automatically when using (package-with-python2 ...) on a Python 3
package that has 'python-sphinx' in inputs.
Most, or all, Python packages do not use Sphinx as runtime library, but
only calls its executables to generate documentation. Thus, we do not
actually need the Python 2 variant.
I tried fixing this in (guix build-system python) by only transforming
packages whose names start with 'python-', and renaming 'python-sphinx'
to just 'sphinx'. It was a clever one-liner until I realized that
Python 2 packages now got a variant of 'sphinx' that's built with Python
3 (yay!), but all the *inputs* of this Sphinx variant were transformed
into Python 2! So it did not actually build in the end.
I'm mostly venting here, but filing the bug so we can target it for the
next 'core-updates' round. Ideas welcome.
There are some other improvements I'd like to see in
python-build-system, such as automatically calling 'pytest' instead of
the deprecated 'python setup.py test' when pytest is available.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#40029: Preventing automatic python2 transformation of some packages
2020-03-11 18:29 bug#40029: Preventing automatic python2 transformation of some packages Marius Bakke
@ 2020-03-12 12:19 ` Leo Prikler
2020-03-12 13:04 ` Ludovic Courtès
1 sibling, 0 replies; 4+ messages in thread
From: Leo Prikler @ 2020-03-12 12:19 UTC (permalink / raw)
To: mbakke, 40029
> The only reason we have this package is because it gets pulled in
> automatically when using (package-with-python2 ...) on a Python 3
> package that has 'python-sphinx' in inputs.
I think the problem here, is that (package-with-python2 ...) overwrites
all sorts of inputs per package-mapping. Perhaps one could write an
alternative on top, that keeps native-inputs as-is and adds python3 to
them. WDYT?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#40029: Preventing automatic python2 transformation of some packages
2020-03-11 18:29 bug#40029: Preventing automatic python2 transformation of some packages Marius Bakke
2020-03-12 12:19 ` Leo Prikler
@ 2020-03-12 13:04 ` Ludovic Courtès
2020-07-25 19:05 ` Marius Bakke
1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2020-03-12 13:04 UTC (permalink / raw)
To: Marius Bakke; +Cc: 40029
[-- Attachment #1: Type: text/plain, Size: 406 bytes --]
Hi!
Marius Bakke <mbakke@fastmail.com> skribis:
> 'python2-sphinx' is obsolete and increasingly a maintenance burden,
> because we need to keep special versions around just to make it build.
>
> The only reason we have this package is because it gets pulled in
> automatically when using (package-with-python2 ...) on a Python 3
> package that has 'python-sphinx' in inputs.
What about this evil hack?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 582 bytes --]
diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index 323d5b4457..66306e97fc 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -99,7 +99,7 @@
for Python projects or other documents consisting of multiple reStructuredText
sources.")
(license license:bsd-2)
- (properties `((python2-variant . ,(delay python2-sphinx))))))
+ (properties `((python2-variant . ,(delay python-sphinx))))))
;; Sphinx 2 does not support Python 2, so we stick with this older version here.
;; Remove this package once python2-pbcore no longer requires it.
[-- Attachment #3: Type: text/plain, Size: 144 bytes --]
The effect should be that ‘package-with-python2’ always keeps
‘python-sphinx’ unchanged. (It’s a double-edge sword.)
Ludo’.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#40029: Preventing automatic python2 transformation of some packages
2020-03-12 13:04 ` Ludovic Courtès
@ 2020-07-25 19:05 ` Marius Bakke
0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2020-07-25 19:05 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 40029-done
[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]
Ludovic Courtès <ludo@gnu.org> writes:
> Hi!
>
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> 'python2-sphinx' is obsolete and increasingly a maintenance burden,
>> because we need to keep special versions around just to make it build.
>>
>> The only reason we have this package is because it gets pulled in
>> automatically when using (package-with-python2 ...) on a Python 3
>> package that has 'python-sphinx' in inputs.
>
> What about this evil hack?
>
> diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
> index 323d5b4457..66306e97fc 100644
> --- a/gnu/packages/sphinx.scm
> +++ b/gnu/packages/sphinx.scm
> @@ -99,7 +99,7 @@
> for Python projects or other documents consisting of multiple reStructuredText
> sources.")
> (license license:bsd-2)
> - (properties `((python2-variant . ,(delay python2-sphinx))))))
> + (properties `((python2-variant . ,(delay python-sphinx))))))
>
> ;; Sphinx 2 does not support Python 2, so we stick with this older version here.
> ;; Remove this package once python2-pbcore no longer requires it.
>
> The effect should be that ‘package-with-python2’ always keeps
> ‘python-sphinx’ unchanged. (It’s a double-edge sword.)
This is brilliant and I can confirm it works. It never would have
occured to me that this is possible.
'python2-sphinx' will be removed on the next staging cycle.
Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-25 19:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-11 18:29 bug#40029: Preventing automatic python2 transformation of some packages Marius Bakke
2020-03-12 12:19 ` Leo Prikler
2020-03-12 13:04 ` Ludovic Courtès
2020-07-25 19:05 ` Marius Bakke
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.