Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1478324
| From | Jani Nikula <jani.nikula@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: pyc files in source dir with O= |
| Date | 2016-09-07 16:10 +0200 |
| Message-ID | <seLI5-JF-11@gated-at.bofh.it> (permalink) |
| References | <seKM1-9T-7@gated-at.bofh.it> <seL5o-gn-19@gated-at.bofh.it> <seLoJ-n1-23@gated-at.bofh.it> |
| Organization | Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
pyc files in source dir with O= Geert Uytterhoeven <geert@linux-m68k.org> - 2016-09-07 15:10 +0200
Re: pyc files in source dir with O= Jani Nikula <jani.nikula@linux.intel.com> - 2016-09-07 15:30 +0200
Re: pyc files in source dir with O= Geert Uytterhoeven <geert@linux-m68k.org> - 2016-09-07 15:50 +0200
Re: pyc files in source dir with O= Jani Nikula <jani.nikula@linux.intel.com> - 2016-09-07 16:10 +0200
csiph-web