GNU bug report logs - #33497
[PATCH] Add doc (including info manual) for cmake

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sun, 25 Nov 2018 06:50:03 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33497 in the body.
You can then email your comments to 33497 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#33497; Package guix. (Sun, 25 Nov 2018 06:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 25 Nov 2018 06:50:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: Our CMake package has no documentation
Date: Sun, 25 Nov 2018 01:49:10 -0500
Hello,

Our CMake package lacks any documentation (manpage or other). Patch to
follow.

Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#33497; Package guix. (Sun, 25 Nov 2018 06:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 33497 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 33497 <at> debbugs.gnu.org
Subject: [PATCH] Re: bug#33497: Our CMake package has no documentation
Date: Sun, 25 Nov 2018 01:54:55 -0500
[Message part 1 (text/plain, inline)]
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Hello,
>
> Our CMake package lacks any documentation (manpage or other). Patch to
> follow.
>
> Maxim

Here's the patch to be merged in core-updates (or core-updates-next).

[0001-gnu-cmake-Generate-the-documentation.patch (text/x-patch, attachment)]

Changed bug title to '[PATCH] Add doc (including info manual) for cmake' from 'Our CMake package has no documentation' Request was from SFL laptop <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 28 Jan 2019 00:47:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#33497; Package guix. (Tue, 12 Feb 2019 20:18:02 GMT) Full text and rfc822 format available.

Message #13 received at 33497 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 33497 <at> debbugs.gnu.org
Subject: Re: bug#33497: [PATCH] Re: bug#33497: Our CMake package has no
 documentation
Date: Tue, 12 Feb 2019 21:17:41 +0100
[Message part 1 (text/plain, inline)]
Hello!

Now would be the time to get this in 'core-updates'.

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> Hello,
>>
>> Our CMake package lacks any documentation (manpage or other). Patch to
>> follow.
>>
>> Maxim
>
> Here's the patch to be merged in core-updates (or core-updates-next).
>
> From 07625983cd901c94e4ac25b157035c95e33a115e Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
> Date: Sun, 25 Nov 2018 01:39:54 -0500
> Subject: [PATCH] gnu: cmake: Generate the documentation.
>
> This fixes https://bugs.gnu.org/33497.
>
> * gnu/packages/cmake.scm (gnu): Use the (gnu package python) and
> (gnu packages texinfo) modules.
> (cmake)[configure]: Add arguments to configure so that manual pages, info and
> HTML documentation is generated.
> [move-html-doc]: New phase.
> [native-inputs]: Add the native inputs required for building the
> documentation.
> [outputs]: Add a "doc" output.

I'm not very comfortable with pulling python-sphinx into the dependency
closure of CMake, because then we can't update it or its dependencies
outside of the 'core-updates' cycle.  It could also cause circular
dependency issues down the road.

Would it make sense to build the documentation as a separate package?
In that case it can go on the master branch.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#33497; Package guix. (Tue, 12 Mar 2019 01:34:02 GMT) Full text and rfc822 format available.

Message #16 received at 33497 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 33497 <at> debbugs.gnu.org
Subject: Re: bug#33497: [PATCH] Re: bug#33497: Our CMake package has no
 documentation
Date: Mon, 11 Mar 2019 21:33:17 -0400
Hello Marius!

Sorry for the delay.

Marius Bakke <mbakke <at> fastmail.com> writes:

> Hello!
>
> Now would be the time to get this in 'core-updates'.
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>>
>>> Hello,
>>>
>>> Our CMake package lacks any documentation (manpage or other). Patch to
>>> follow.
>>>
>>> Maxim
>>
>> Here's the patch to be merged in core-updates (or core-updates-next).
>>
>> From 07625983cd901c94e4ac25b157035c95e33a115e Mon Sep 17 00:00:00 2001
>> From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
>> Date: Sun, 25 Nov 2018 01:39:54 -0500
>> Subject: [PATCH] gnu: cmake: Generate the documentation.
>>
>> This fixes https://bugs.gnu.org/33497.
>>
>> * gnu/packages/cmake.scm (gnu): Use the (gnu package python) and
>> (gnu packages texinfo) modules.
>> (cmake)[configure]: Add arguments to configure so that manual pages, info and
>> HTML documentation is generated.
>> [move-html-doc]: New phase.
>> [native-inputs]: Add the native inputs required for building the
>> documentation.
>> [outputs]: Add a "doc" output.
>
> I'm not very comfortable with pulling python-sphinx into the dependency
> closure of CMake, because then we can't update it or its dependencies
> outside of the 'core-updates' cycle.  It could also cause circular
> dependency issues down the road.
>
> Would it make sense to build the documentation as a separate package?
> In that case it can go on the master branch.

I don't like the idea of having a separate package for the documentation
of cmake because it goes against the expectations of Guix users (package
comes with its manpage, and extra doc can be installed as extra output
of the same package).

Maybe we could have a "cmake-minimal" package we'd keep hidden and use
by default as part of the cmake-build-system, which wouldn't include the
doc, and the regular, user facing cmake would be the one in this patch?

Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#33497; Package guix. (Sun, 17 Mar 2019 16:37:01 GMT) Full text and rfc822 format available.

Message #19 received at 33497 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 33497 <at> debbugs.gnu.org
Subject: Re: bug#33497: [PATCH] Re: bug#33497: Our CMake package has no
 documentation
Date: Sun, 17 Mar 2019 17:36:00 +0100
[Message part 1 (text/plain, inline)]
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Hello Marius!
>
> Sorry for the delay.
>
> Marius Bakke <mbakke <at> fastmail.com> writes:
>
>> Hello!
>>
>> Now would be the time to get this in 'core-updates'.
>>
>> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>>
>>> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>>>
>>>> Hello,
>>>>
>>>> Our CMake package lacks any documentation (manpage or other). Patch to
>>>> follow.
>>>>
>>>> Maxim
>>>
>>> Here's the patch to be merged in core-updates (or core-updates-next).
>>>
>>> From 07625983cd901c94e4ac25b157035c95e33a115e Mon Sep 17 00:00:00 2001
>>> From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
>>> Date: Sun, 25 Nov 2018 01:39:54 -0500
>>> Subject: [PATCH] gnu: cmake: Generate the documentation.
>>>
>>> This fixes https://bugs.gnu.org/33497.
>>>
>>> * gnu/packages/cmake.scm (gnu): Use the (gnu package python) and
>>> (gnu packages texinfo) modules.
>>> (cmake)[configure]: Add arguments to configure so that manual pages, info and
>>> HTML documentation is generated.
>>> [move-html-doc]: New phase.
>>> [native-inputs]: Add the native inputs required for building the
>>> documentation.
>>> [outputs]: Add a "doc" output.
>>
>> I'm not very comfortable with pulling python-sphinx into the dependency
>> closure of CMake, because then we can't update it or its dependencies
>> outside of the 'core-updates' cycle.  It could also cause circular
>> dependency issues down the road.
>>
>> Would it make sense to build the documentation as a separate package?
>> In that case it can go on the master branch.
>
> I don't like the idea of having a separate package for the documentation
> of cmake because it goes against the expectations of Guix users (package
> comes with its manpage, and extra doc can be installed as extra output
> of the same package).
>
> Maybe we could have a "cmake-minimal" package we'd keep hidden and use
> by default as part of the cmake-build-system, which wouldn't include the
> doc, and the regular, user facing cmake would be the one in this patch?

This sounds reasonable to me.  Can you send a patch?  :-)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#33497; Package guix. (Wed, 20 Mar 2019 16:07:01 GMT) Full text and rfc822 format available.

Message #22 received at 33497 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 33497 <at> debbugs.gnu.org
Subject: Re: bug#33497: [PATCH] Re: bug#33497: Our CMake package has no
 documentation
Date: Wed, 20 Mar 2019 12:06:36 -0400
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

[...]

>>> I'm not very comfortable with pulling python-sphinx into the dependency
>>> closure of CMake, because then we can't update it or its dependencies
>>> outside of the 'core-updates' cycle.  It could also cause circular
>>> dependency issues down the road.
>>>
>>> Would it make sense to build the documentation as a separate package?
>>> In that case it can go on the master branch.
>>
>> I don't like the idea of having a separate package for the documentation
>> of cmake because it goes against the expectations of Guix users (package
>> comes with its manpage, and extra doc can be installed as extra output
>> of the same package).
>>
>> Maybe we could have a "cmake-minimal" package we'd keep hidden and use
>> by default as part of the cmake-build-system, which wouldn't include the
>> doc, and the regular, user facing cmake would be the one in this patch?
>
> This sounds reasonable to me.  Can you send a patch?  :-)

Here it comes, attached! Thanks to Ricardo on #guix for helping me
resolve a quoting issue :-).

To validate it works, I had to disable some failing test suites, using:
[disable-broken-tests.diff (text/x-patch, inline)]
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index f47f7623b4..259ea23a67 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -106,26 +106,26 @@ conversions for values passed between the two languages.")
                   (guix build python-build-system))
        #:phases
        (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             (setenv "PYTHONPATH"
-                     (string-append
-                      (getenv "PYTHONPATH")
-                      ":" (getcwd) "/build/"
-                      (car (scandir "build" (cut string-prefix? "lib." <>)))))
+         ;; (replace 'check
+         ;;   (lambda _
+         ;;     (setenv "PYTHONPATH"
+         ;;             (string-append
+         ;;              (getenv "PYTHONPATH")
+         ;;              ":" (getcwd) "/build/"
+         ;;              (car (scandir "build" (cut string-prefix? "lib." <>)))))
 
-             ;; XXX The "normal" approach of setting CC and friends does
-             ;; not work here.  Is this the correct way of doing things?
-             (substitute* "testing/embedding/test_basic.py"
-               (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
-                (string-append "c = distutils.ccompiler.new_compiler();"
-                               "c.set_executables(compiler='gcc',"
-                               "compiler_so='gcc',linker_exe='gcc',"
-                               "linker_so='gcc -shared')")))
-             (substitute* "testing/cffi0/test_ownlib.py"
-               (("'cc testownlib") "'gcc testownlib"))
-             (invoke "py.test" "-v" "c/" "testing/")
-             #t))
+         ;;     ;; XXX The "normal" approach of setting CC and friends does
+         ;;     ;; not work here.  Is this the correct way of doing things?
+         ;;     (substitute* "testing/embedding/test_basic.py"
+         ;;       (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
+         ;;        (string-append "c = distutils.ccompiler.new_compiler();"
+         ;;                       "c.set_executables(compiler='gcc',"
+         ;;                       "compiler_so='gcc',linker_exe='gcc',"
+         ;;                       "linker_so='gcc -shared')")))
+         ;;     (substitute* "testing/cffi0/test_ownlib.py"
+         ;;       (("'cc testownlib") "'gcc testownlib"))
+         ;;     (invoke "py.test" "-v" "c/" "testing/")
+         ;;     #t))
          (add-before 'check 'disable-failing-test
            ;; This is assumed to be a libffi issue:
            ;; https://bitbucket.org/cffi/cffi/issues/312/tests-failed-with-armv8
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0a483fb1db..67de01573e 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -127,7 +127,8 @@
                "tk"))                     ;tkinter; adds 50 MiB to the closure
     (build-system gnu-build-system)
     (arguments
-     `(#:test-target "test"
+     `(#:tests? #f
+       #:test-target "test"
        #:configure-flags
        (list "--enable-shared"                    ;allow embedding
              "--with-system-ffi"                  ;build ctypes
[0001-cmake-Generate-documentation.patch (text/x-patch, attachment)]
[Message part 4 (text/plain, inline)]
Thanks!

Maxim

Information forwarded to bug-guix <at> gnu.org:
bug#33497; Package guix. (Thu, 21 Mar 2019 02:09:01 GMT) Full text and rfc822 format available.

Message #25 received at 33497 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 33497 <at> debbugs.gnu.org
Subject: Re: bug#33497: [PATCHv2] Re: bug#33497: Our CMake package has no
 documentation
Date: Wed, 20 Mar 2019 22:08:40 -0400
[Message part 1 (text/plain, inline)]
Here's an improved version, following some comments of Marius on #guix.

[0001-cmake-Generate-documentation.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Maxim
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#33497; Package guix. (Thu, 21 Mar 2019 18:41:02 GMT) Full text and rfc822 format available.

Message #28 received at 33497 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 33497 <at> debbugs.gnu.org
Subject: Re: bug#33497: [PATCHv2] Re: bug#33497: Our CMake package has no
 documentation
Date: Thu, 21 Mar 2019 19:40:47 +0100
[Message part 1 (text/plain, inline)]
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Here's an improved version, following some comments of Marius on #guix.
>
> From 2f33a7321e5e37d37f57c229c8079cb4ffd10834 Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
> Date: Wed, 20 Mar 2019 21:38:19 -0400
> Subject: [PATCH] cmake: Generate documentation.
>
> To prevent complicating the dependencies of a core tool, a new variant,
> CMAKE-MINIMAL is introduced and the CMake build system is configured to use it
> by default.  The regular CMAKE package gains a manpage, info manual as well
> as HTML documentation.
>
> Fixes issue #33497 (https://bugs.gnu.org/33497).
>
> * gnu/packages/cmake.scm (gnu): Use modules (gnu packages python-xyz),
> (gnu packages texinfo) and (srfi srfi-1).
> (cmake-minimal): Rename the original cmake variable to this.
> [phases]{configure}: Extract the configure script arguments to...
> [configure-flags]: here.
> [properties]: Set the HIDDEN? property to #t.
> (cmake): New variable, which inherits from CMAKE-MINIMAL.
> [phases]{move-html-doc}: Add phase.
> [native-inputs]: Add PYTHON-SPHINX and TEXINFO.
> [outputs]: Add the "doc" output.
> [properties]: Clear the inherited HIDDEN? property.
> * guix/build-system/cmake.scm (default-cmake): Use CMAKE-MINIMAL instead of
> CMAKE.

Thanks!  LGTM.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Fri, 22 Mar 2019 02:20:01 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Fri, 22 Mar 2019 02:20:02 GMT) Full text and rfc822 format available.

Message #33 received at 33497-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 33497-done <at> debbugs.gnu.org
Subject: Re: bug#33497: [PATCHv2] Re: bug#33497: Our CMake package has no
 documentation
Date: Thu, 21 Mar 2019 22:19:29 -0400
Marius Bakke <mbakke <at> fastmail.com> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> Here's an improved version, following some comments of Marius on #guix.
>>
>> From 2f33a7321e5e37d37f57c229c8079cb4ffd10834 Mon Sep 17 00:00:00 2001
>> From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
>> Date: Wed, 20 Mar 2019 21:38:19 -0400
>> Subject: [PATCH] cmake: Generate documentation.
>>
>> To prevent complicating the dependencies of a core tool, a new variant,
>> CMAKE-MINIMAL is introduced and the CMake build system is configured to use it
>> by default.  The regular CMAKE package gains a manpage, info manual as well
>> as HTML documentation.
>>
>> Fixes issue #33497 (https://bugs.gnu.org/33497).
>>
>> * gnu/packages/cmake.scm (gnu): Use modules (gnu packages python-xyz),
>> (gnu packages texinfo) and (srfi srfi-1).
>> (cmake-minimal): Rename the original cmake variable to this.
>> [phases]{configure}: Extract the configure script arguments to...
>> [configure-flags]: here.
>> [properties]: Set the HIDDEN? property to #t.
>> (cmake): New variable, which inherits from CMAKE-MINIMAL.
>> [phases]{move-html-doc}: Add phase.
>> [native-inputs]: Add PYTHON-SPHINX and TEXINFO.
>> [outputs]: Add the "doc" output.
>> [properties]: Clear the inherited HIDDEN? property.
>> * guix/build-system/cmake.scm (default-cmake): Use CMAKE-MINIMAL instead of
>> CMAKE.
>
> Thanks!  LGTM.

Pushed to core-updates with commit 2f33a7321e. Thank you!

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 19 Apr 2019 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.