]> git.baikalelectronics.ru Git - kernel.git/commit
Documentation/sphinx: prevent generation of .pyc files in the source tree
authorJani Nikula <jani.nikula@intel.com>
Tue, 31 Jan 2017 18:18:05 +0000 (20:18 +0200)
committerJonathan Corbet <corbet@lwn.net>
Wed, 1 Feb 2017 20:03:58 +0000 (13:03 -0700)
commite16e44f134d1703b8853063b6e0577a9ca4cc478
treebe8309db0202429d3272d88277cee699d7467165
parentebff9acf17aa6c5f965edb51415dd9990588414e
Documentation/sphinx: prevent generation of .pyc files in the source tree

Use PYTHONDONTWRITEBYTECODE=1 to prevent python from creating .pyc files
in the source tree. Python 3.2 has a __pycache__ scheme [1], but before
that the only alternative seems to be to copy the source files to the
build tree to ensure the .pyc files are created there too. Just prevent
.pyc file generation for simplicity.

Considering the small amount of python code to compile (assuming sphinx
itself has .pyc around), the impact on build is neglible.

[1] http://stackoverflow.com/questions/3522079/changing-the-directory-where-pyc-files-are-created

References: http://lkml.kernel.org/r/CAMuHMdVxqpH7-9XJ+YE_pgoA+-fe0969cSkOehYh3uubYcrhZA@mail.gmail.com
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
References: http://lkml.kernel.org/r/1485816692.2900.17.camel@decadent.org.uk
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/Makefile.sphinx