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

Updated environment-specific console script generation to use modern style.

parent a2062b81
......@@ -31,14 +31,23 @@ from setuptools.command.test import test as _test
scripts = []
console_scripts = ["easy_install = setuptools.command.easy_install:main"]
# Gentoo distributions manage the python-version-specific scripts themselves,
# so they define an environment variable to suppress the creation of the
# version-specific scripts.
if os.environ.get("SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0") and \
os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0"):
console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3])
def _gen_console_scripts():
yield "easy_install = setuptools.command.easy_install:main"
# Gentoo distributions manage the python-version-specific scripts
# themselves, so those platforms define an environment variable to
# suppress the creation of the version-specific scripts.
var_names = (
'SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT',
'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT',
)
if any(os.environ.get(var) not in (None, "", "0") for var in var_names):
return
yield ("easy_install-{shortver} = setuptools.command.easy_install:main"
.format(shortver=sys.version[:3]))
console_scripts = list(_gen_console_scripts())
# specific command that is used to generate windows .exe files
class build_py(_build_py):
......
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