Use console_scripts entrypoint.

Since the project uses entrypoints so heavily - move the jenkins-jobs script
to be contained within the project and have entrypoints generate the script.

Change-Id: Ie9541163c8677de1b05576491c8e9e63d3bd25fc
Reviewed-on: https://review.openstack.org/15816
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Monty Taylor 2012-11-10 15:42:17 -08:00 committed by Jenkins
parent 863d0a01d5
commit e4adf8fbcf
3 changed files with 6 additions and 4 deletions

View File

@ -35,7 +35,6 @@ setuptools.setup(
cmdclass=setup.get_cmdclass(),
install_requires=requires,
dependency_links=depend_links,
scripts=['jenkins-jobs'],
zip_safe=False,
classifiers=[
'Environment :: Console',
@ -46,6 +45,9 @@ setuptools.setup(
'Programming Language :: Python'
],
entry_points={
'console_scripts': [
'jenkins-jobs=jenkins_jobs.cmd:main',
],
'jenkins_jobs.projects': [
'freestyle=jenkins_jobs.modules.project_freestyle:Freestyle',
'maven=jenkins_jobs.modules.project_maven:Maven',

View File

@ -14,13 +14,13 @@ commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc,build .
[testenv:pyflakes]
deps = pyflakes
commands = pyflakes jenkins_jobs jenkins-jobs setup.py
commands = pyflakes jenkins_jobs setup.py
[testenv:compare-xml-old]
commands = ./jenkins-jobs test -o .test/old/out/ .test/old/config/
commands = jenkins-jobs test -o .test/old/out/ .test/old/config/
[testenv:compare-xml-new]
commands = ./jenkins-jobs test -o .test/new/out/ .test/new/config/
commands = jenkins-jobs test -o .test/new/out/ .test/new/config/
[testenv:venv]
commands = {posargs}