Skip to content

Commit

Permalink
Merge pull request #4700 from minrk/ifmain
Browse files Browse the repository at this point in the history
use if main block in entry points
  • Loading branch information
minrk committed Dec 17, 2013
2 parents 3e14632 + 80e885d commit 7af5ec3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setupbase.py
Expand Up @@ -334,8 +334,9 @@ def find_entry_points():

script_src = """#!{executable}
# This script was automatically generated by setup.py
from {mod} import {func}
{func}()
if __name__ == '__main__':
from {mod} import {func}
{func}()
"""

class build_scripts_entrypt(build_scripts):
Expand Down

0 comments on commit 7af5ec3

Please sign in to comment.