guarding scripts with __main__ and doc changes

tox-flakes environment tries to import the modules for
checking, and that may fail because of its dependencies

--HG--
branch : cx_freeze-support
This commit is contained in:
Bruno Oliveira 2014-07-30 22:28:03 -03:00
parent 82d573e391
commit 3c649cf91d
3 changed files with 19 additions and 16 deletions

View File

@ -703,7 +703,8 @@ must declare them explicitly by using ``pytest.cx_freeze_support.includes()``::
import pytest
setup(
name="runtests",
name="app_main",
executables=[Executable("app_main.py")],
options={"build_exe":
{
'includes': pytest.cx_freeze_support.includes()}

View File

@ -1,6 +1,7 @@
"""
Sample setup.py script that generates an executable with pytest runner embedded.
"""
if __name__ == '__main__':
from cx_Freeze import setup, Executable
import pytest

View File

@ -5,6 +5,7 @@ directory.
.. note:: somehow calling "build/runtests_script" directly from tox doesn't
seem to work (at least on Windows).
"""
if __name__ == '__main__':
import os
import sys