Commit 89132919 authored by Jason R. Coombs's avatar Jason R. Coombs

Use a single, multiline literal to express the template for clarity.

--HG--
extra : rebase_source : df5f817f45451b3a2c4093c12bb7b2b51f8ff3b7
parent e8319c9e
[setuptools.file_finders]
svn_cvs = setuptools.command.sdist:_default_revctrl
[egg_info.writers]
depends.txt = setuptools.command.egg_info:warn_depends_obsolete
top_level.txt = setuptools.command.egg_info:write_toplevel_names
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
dependency_links.txt = setuptools.command.egg_info:overwrite_arg
requires.txt = setuptools.command.egg_info:write_requirements
PKG-INFO = setuptools.command.egg_info:write_pkg_info
entry_points.txt = setuptools.command.egg_info:write_entries
[setuptools.installation]
eggsecutable = setuptools.command.easy_install:bootstrap
[console_scripts]
easy_install = setuptools.command.easy_install:main
easy_install-3.3 = setuptools.command.easy_install:main
[distutils.setup_keywords]
dependency_links = setuptools.dist:assert_string_list
packages = setuptools.dist:check_packages
exclude_package_data = setuptools.dist:check_package_data
use_2to3_exclude_fixers = setuptools.dist:assert_string_list
package_data = setuptools.dist:check_package_data
use_2to3 = setuptools.dist:assert_bool
tests_require = setuptools.dist:check_requirements
entry_points = setuptools.dist:check_entry_points
extras_require = setuptools.dist:check_extras
include_package_data = setuptools.dist:assert_bool
eager_resources = setuptools.dist:assert_string_list
zip_safe = setuptools.dist:assert_bool
install_requires = setuptools.dist:check_requirements
use_2to3_fixers = setuptools.dist:assert_string_list
test_suite = setuptools.dist:check_test_suite
test_loader = setuptools.dist:check_importable
namespace_packages = setuptools.dist:check_nsp
convert_2to3_doctests = setuptools.dist:assert_string_list
[distutils.commands]
bdist_egg = setuptools.command.bdist_egg:bdist_egg
egg_info = setuptools.command.egg_info:egg_info
alias = setuptools.command.alias:alias
sdist = setuptools.command.sdist:sdist
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
test = setuptools.command.test:test
easy_install = setuptools.command.easy_install:easy_install
register = setuptools.command.register:register
setopt = setuptools.command.setopt:setopt
install = setuptools.command.install:install
install_scripts = setuptools.command.install_scripts:install_scripts
bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst
build_ext = setuptools.command.build_ext:build_ext
rotate = setuptools.command.rotate:rotate
develop = setuptools.command.develop:develop
install_lib = setuptools.command.install_lib:install_lib
upload_docs = setuptools.command.upload_docs:upload_docs
install_egg_info = setuptools.command.install_egg_info:install_egg_info
build_py = setuptools.command.build_py:build_py
saveopts = setuptools.command.saveopts:saveopts
[setuptools.file_finders]
svn_cvs = setuptools.command.sdist:_default_revctrl
[egg_info.writers]
depends.txt = setuptools.command.egg_info:warn_depends_obsolete
top_level.txt = setuptools.command.egg_info:write_toplevel_names
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
dependency_links.txt = setuptools.command.egg_info:overwrite_arg
requires.txt = setuptools.command.egg_info:write_requirements
PKG-INFO = setuptools.command.egg_info:write_pkg_info
entry_points.txt = setuptools.command.egg_info:write_entries
[setuptools.installation]
eggsecutable = setuptools.command.easy_install:bootstrap
[console_scripts]
easy_install = setuptools.command.easy_install:main
easy_install-3.3 = setuptools.command.easy_install:main
[distutils.setup_keywords]
dependency_links = setuptools.dist:assert_string_list
packages = setuptools.dist:check_packages
exclude_package_data = setuptools.dist:check_package_data
use_2to3_exclude_fixers = setuptools.dist:assert_string_list
package_data = setuptools.dist:check_package_data
use_2to3 = setuptools.dist:assert_bool
tests_require = setuptools.dist:check_requirements
entry_points = setuptools.dist:check_entry_points
extras_require = setuptools.dist:check_extras
include_package_data = setuptools.dist:assert_bool
eager_resources = setuptools.dist:assert_string_list
zip_safe = setuptools.dist:assert_bool
install_requires = setuptools.dist:check_requirements
use_2to3_fixers = setuptools.dist:assert_string_list
test_suite = setuptools.dist:check_test_suite
test_loader = setuptools.dist:check_importable
namespace_packages = setuptools.dist:check_nsp
convert_2to3_doctests = setuptools.dist:assert_string_list
[distutils.commands]
bdist_egg = setuptools.command.bdist_egg:bdist_egg
egg_info = setuptools.command.egg_info:egg_info
alias = setuptools.command.alias:alias
sdist = setuptools.command.sdist:sdist
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
test = setuptools.command.test:test
easy_install = setuptools.command.easy_install:easy_install
register = setuptools.command.register:register
setopt = setuptools.command.setopt:setopt
install = setuptools.command.install:install
install_scripts = setuptools.command.install_scripts:install_scripts
bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst
build_ext = setuptools.command.build_ext:build_ext
rotate = setuptools.command.rotate:rotate
develop = setuptools.command.develop:develop
install_lib = setuptools.command.install_lib:install_lib
upload_docs = setuptools.command.upload_docs:upload_docs
install_egg_info = setuptools.command.install_egg_info:install_egg_info
build_py = setuptools.command.build_py:build_py
saveopts = setuptools.command.saveopts:saveopts
......@@ -22,6 +22,7 @@ import re
import stat
import random
import platform
import textwrap
from glob import glob
from distutils import log, dir_util
......@@ -1786,18 +1787,17 @@ class ScriptWriter(object):
gui apps.
"""
template = (
"# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r\n"
"__requires__ = %(spec)r\n"
"import sys\n"
"from pkg_resources import load_entry_point\n"
"\n"
"if __name__ == '__main__':"
"\n"
" sys.exit(\n"
" load_entry_point(%(spec)r, %(group)r, %(name)r)()\n"
" )\n"
)
template = textwrap.dedent("""
# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
__requires__ = %(spec)r
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point(%(spec)r, %(group)r, %(name)r)()
)
""").lstrip()
@classmethod
def get_script_args(cls, dist, executable=sys_executable, wininst=False):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment