mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-17 12:39:54 +08:00
Merge pull request #4700 from minrk/ifmain
use if main block in entry points
This commit is contained in:
commit
a80e387b0a
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user