emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40029: closed (Preventing automatic python2 transformation of some p


From: GNU bug Tracking System
Subject: bug#40029: closed (Preventing automatic python2 transformation of some packages)
Date: Sat, 25 Jul 2020 19:06:02 +0000

Your message dated Sat, 25 Jul 2020 21:05:32 +0200
with message-id <87zh7nqutf.fsf@gnu.org>
and subject line Re: bug#40029: Preventing automatic python2 transformation of 
some packages
has caused the debbugs.gnu.org bug report #40029,
regarding Preventing automatic python2 transformation of some packages
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
40029: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40029
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Preventing automatic python2 transformation of some packages Date: Wed, 11 Mar 2020 19:29:26 +0100 User-agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu)
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: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#40029: Preventing automatic python2 transformation of some packages Date: Sat, 25 Jul 2020 21:05:32 +0200
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: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]