* pyc files in source dir with O=
@ 2016-09-07 13:03 Geert Uytterhoeven
2016-09-07 13:28 ` Jani Nikula
0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2016-09-07 13:03 UTC (permalink / raw)
To: Jonathan Corbet, Markus Heiser; +Cc: linux-doc, linux-kernel
When running "make htmldocs O=/path/to/somewhere", *.pyc files end up
in the source tree instead of in the build tree:
$ git ls-files -o
Documentation/sphinx/kernel-doc.pyc
Documentation/sphinx/kernel_include.pyc
Documentation/sphinx/rstFlatTable.pyc
$
This is with v4.8-rc5.
With next-20160907, two more files appear:
Documentation/sphinx/cdomain.pyc
Documentation/sphinx/load_config.pyc
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: pyc files in source dir with O=
2016-09-07 13:03 pyc files in source dir with O= Geert Uytterhoeven
@ 2016-09-07 13:28 ` Jani Nikula
2016-09-07 13:44 ` Geert Uytterhoeven
2016-09-18 14:53 ` Markus Heiser
0 siblings, 2 replies; 6+ messages in thread
From: Jani Nikula @ 2016-09-07 13:28 UTC (permalink / raw)
To: Geert Uytterhoeven, Jonathan Corbet, Markus Heiser
Cc: linux-doc, linux-kernel
On Wed, 07 Sep 2016, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> When running "make htmldocs O=/path/to/somewhere", *.pyc files end up
> in the source tree instead of in the build tree:
>
> $ git ls-files -o
> Documentation/sphinx/kernel-doc.pyc
> Documentation/sphinx/kernel_include.pyc
> Documentation/sphinx/rstFlatTable.pyc
> $
>
> This is with v4.8-rc5.
>
> With next-20160907, two more files appear:
>
> Documentation/sphinx/cdomain.pyc
> Documentation/sphinx/load_config.pyc
This should help
diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
index 92deea30b183..a4cba2d1aaf1 100644
--- a/Documentation/Makefile.sphinx
+++ b/Documentation/Makefile.sphinx
@@ -53,6 +53,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1))
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
+ PYTHONDONTWRITEBYTECODE=1 \
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
$(SPHINXBUILD) \
-b $2 \
Side note, I'm really sad the Sphinx build has grown so ugly and
complicated now. :(
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: pyc files in source dir with O=
2016-09-07 13:28 ` Jani Nikula
@ 2016-09-07 13:44 ` Geert Uytterhoeven
2016-09-07 14:05 ` Jani Nikula
2016-09-18 14:53 ` Markus Heiser
1 sibling, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2016-09-07 13:44 UTC (permalink / raw)
To: Jani Nikula; +Cc: Jonathan Corbet, Markus Heiser, linux-doc, linux-kernel
Hi Jani,
On Wed, Sep 7, 2016 at 3:28 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Wed, 07 Sep 2016, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> When running "make htmldocs O=/path/to/somewhere", *.pyc files end up
>> in the source tree instead of in the build tree:
>>
>> $ git ls-files -o
>> Documentation/sphinx/kernel-doc.pyc
>> Documentation/sphinx/kernel_include.pyc
>> Documentation/sphinx/rstFlatTable.pyc
>> $
>>
>> This is with v4.8-rc5.
>>
>> With next-20160907, two more files appear:
>>
>> Documentation/sphinx/cdomain.pyc
>> Documentation/sphinx/load_config.pyc
>
> This should help
>
> diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
> index 92deea30b183..a4cba2d1aaf1 100644
> --- a/Documentation/Makefile.sphinx
> +++ b/Documentation/Makefile.sphinx
> @@ -53,6 +53,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1))
>
> quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
> cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
> + PYTHONDONTWRITEBYTECODE=1 \
> BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
> $(SPHINXBUILD) \
> -b $2 \
Thanks, that works (on next-20160907, doesn't apply to v4.8-rc5).
But IMHO it's a bit drastic. There's no way to let python create them in the
build directory instead?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: pyc files in source dir with O=
2016-09-07 13:44 ` Geert Uytterhoeven
@ 2016-09-07 14:05 ` Jani Nikula
0 siblings, 0 replies; 6+ messages in thread
From: Jani Nikula @ 2016-09-07 14:05 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Jonathan Corbet, Markus Heiser, linux-doc, linux-kernel
On Wed, 07 Sep 2016, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Jani,
>
> On Wed, Sep 7, 2016 at 3:28 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>> On Wed, 07 Sep 2016, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>> When running "make htmldocs O=/path/to/somewhere", *.pyc files end up
>>> in the source tree instead of in the build tree:
>>>
>>> $ git ls-files -o
>>> Documentation/sphinx/kernel-doc.pyc
>>> Documentation/sphinx/kernel_include.pyc
>>> Documentation/sphinx/rstFlatTable.pyc
>>> $
>>>
>>> This is with v4.8-rc5.
>>>
>>> With next-20160907, two more files appear:
>>>
>>> Documentation/sphinx/cdomain.pyc
>>> Documentation/sphinx/load_config.pyc
>>
>> This should help
>>
>> diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
>> index 92deea30b183..a4cba2d1aaf1 100644
>> --- a/Documentation/Makefile.sphinx
>> +++ b/Documentation/Makefile.sphinx
>> @@ -53,6 +53,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1))
>>
>> quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
>> cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
>> + PYTHONDONTWRITEBYTECODE=1 \
>> BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
>> $(SPHINXBUILD) \
>> -b $2 \
>
> Thanks, that works (on next-20160907, doesn't apply to v4.8-rc5).
> But IMHO it's a bit drastic. There's no way to let python create them in the
> build directory instead?
I'm no expert, but the short answer appears to be no [1]. You'd have to
copy the .py files over to the build directory, which is a bit meh.
BR,
Jani.
[1] http://stackoverflow.com/questions/3522079/changing-the-directory-where-pyc-files-are-created
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: pyc files in source dir with O=
2016-09-07 13:28 ` Jani Nikula
2016-09-07 13:44 ` Geert Uytterhoeven
@ 2016-09-18 14:53 ` Markus Heiser
2016-09-19 6:33 ` Jani Nikula
1 sibling, 1 reply; 6+ messages in thread
From: Markus Heiser @ 2016-09-18 14:53 UTC (permalink / raw)
To: Jani Nikula; +Cc: Geert Uytterhoeven, Jonathan Corbet, linux-doc, linux-kernel
Am 07.09.2016 um 15:28 schrieb Jani Nikula <jani.nikula@linux.intel.com>:
> On Wed, 07 Sep 2016, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> When running "make htmldocs O=/path/to/somewhere", *.pyc files end up
>> in the source tree instead of in the build tree:
>>
>> $ git ls-files -o
>> Documentation/sphinx/kernel-doc.pyc
>> Documentation/sphinx/kernel_include.pyc
>> Documentation/sphinx/rstFlatTable.pyc
>> $
>>
>> This is with v4.8-rc5.
>>
>> With next-20160907, two more files appear:
>>
>> Documentation/sphinx/cdomain.pyc
>> Documentation/sphinx/load_config.pyc
>
> This should help
>
> diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
> index 92deea30b183..a4cba2d1aaf1 100644
> --- a/Documentation/Makefile.sphinx
> +++ b/Documentation/Makefile.sphinx
> @@ -53,6 +53,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1))
>
> quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
> cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
> + PYTHONDONTWRITEBYTECODE=1 \
> BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
> $(SPHINXBUILD) \
> -b $2 \
>
>
> Side note, I'm really sad the Sphinx build has grown so ugly and
> complicated now. :(
Hi Jani, I feel guilty about this ...
the "sub-folder" build functionality brought some complexity to
the cmd_sphinx. In the hope, that it helps a bit, I added a small
comment on top ...
# $2 sphinx builder e.g. "html"
# $3 name of the build subfolder / e.g. "media", used as:
# * dest folder relative to $(BUILDDIR) and
# * cache folder relative to $(BUILDDIR)/.doctrees
# $4 dest subfolder e.g. "man" for man pages at media/man
# $5 reST source folder relative to $(srctree)/$(src),
# e.g. "media" for the linux-tv book-set at ./Documentation/media
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
$(SPHINXBUILD) \
-b $2 \
-c $(abspath $(srctree)/$(src)) \
-d $(abspath $(BUILDDIR)/.doctrees/$3) \
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
$(ALLSPHINXOPTS) \
$(abspath $(srctree)/$(src)/$5) \
$(abspath $(BUILDDIR)/$3/$4);
But you are right, it is very compact / complicated.
--Markus--
>
> BR,
> Jani.
>
>
> --
> Jani Nikula, Intel Open Source Technology Center
> --
> To unsubscribe from this list: send the line "unsubscribe linux-doc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: pyc files in source dir with O=
2016-09-18 14:53 ` Markus Heiser
@ 2016-09-19 6:33 ` Jani Nikula
0 siblings, 0 replies; 6+ messages in thread
From: Jani Nikula @ 2016-09-19 6:33 UTC (permalink / raw)
To: Markus Heiser
Cc: Geert Uytterhoeven, Jonathan Corbet, linux-doc, linux-kernel
On Sun, 18 Sep 2016, Markus Heiser <markus.heiser@darmarit.de> wrote:
> Am 07.09.2016 um 15:28 schrieb Jani Nikula <jani.nikula@linux.intel.com>:
>
>> On Wed, 07 Sep 2016, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>> When running "make htmldocs O=/path/to/somewhere", *.pyc files end up
>>> in the source tree instead of in the build tree:
>>>
>>> $ git ls-files -o
>>> Documentation/sphinx/kernel-doc.pyc
>>> Documentation/sphinx/kernel_include.pyc
>>> Documentation/sphinx/rstFlatTable.pyc
>>> $
>>>
>>> This is with v4.8-rc5.
>>>
>>> With next-20160907, two more files appear:
>>>
>>> Documentation/sphinx/cdomain.pyc
>>> Documentation/sphinx/load_config.pyc
>>
>> This should help
>>
>> diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
>> index 92deea30b183..a4cba2d1aaf1 100644
>> --- a/Documentation/Makefile.sphinx
>> +++ b/Documentation/Makefile.sphinx
>> @@ -53,6 +53,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1))
>>
>> quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
>> cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
>> + PYTHONDONTWRITEBYTECODE=1 \
>> BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
>> $(SPHINXBUILD) \
>> -b $2 \
>>
>>
>> Side note, I'm really sad the Sphinx build has grown so ugly and
>> complicated now. :(
>
> Hi Jani, I feel guilty about this ...
>
> the "sub-folder" build functionality brought some complexity to
> the cmd_sphinx. In the hope, that it helps a bit, I added a small
> comment on top ...
No amount of documentation will bring back the ability to build the
documentation with pure Sphinx.
BR,
Jani.
>
> # $2 sphinx builder e.g. "html"
> # $3 name of the build subfolder / e.g. "media", used as:
> # * dest folder relative to $(BUILDDIR) and
> # * cache folder relative to $(BUILDDIR)/.doctrees
> # $4 dest subfolder e.g. "man" for man pages at media/man
> # $5 reST source folder relative to $(srctree)/$(src),
> # e.g. "media" for the linux-tv book-set at ./Documentation/media
>
> quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
> cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
> BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
> $(SPHINXBUILD) \
> -b $2 \
> -c $(abspath $(srctree)/$(src)) \
> -d $(abspath $(BUILDDIR)/.doctrees/$3) \
> -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
> $(ALLSPHINXOPTS) \
> $(abspath $(srctree)/$(src)/$5) \
> $(abspath $(BUILDDIR)/$3/$4);
>
> But you are right, it is very compact / complicated.
>
> --Markus--
>
>>
>> BR,
>> Jani.
>>
>>
>> --
>> Jani Nikula, Intel Open Source Technology Center
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-doc" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-09-19 6:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-07 13:03 pyc files in source dir with O= Geert Uytterhoeven
2016-09-07 13:28 ` Jani Nikula
2016-09-07 13:44 ` Geert Uytterhoeven
2016-09-07 14:05 ` Jani Nikula
2016-09-18 14:53 ` Markus Heiser
2016-09-19 6:33 ` Jani Nikula
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.