diff --git a/jenkins-jobs b/jenkins_jobs/cmd.py similarity index 100% rename from jenkins-jobs rename to jenkins_jobs/cmd.py diff --git a/setup.py b/setup.py index 6a82919e0..354635434 100644 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/tox.ini b/tox.ini index 4d2801e02..f442875e6 100644 --- a/tox.ini +++ b/tox.ini @@ -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}