Skip to content

Commit 4414c01

Browse files
committed
restructure project as installable python package
1 parent 28363d9 commit 4414c01

4 files changed

Lines changed: 27 additions & 11 deletions

File tree

jenkins

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
##!/usr/bin/env python
21
import argparse
3-
import jenkins_cli
4-
2+
from jenkins_cli.cli import JenkinsCli, CliException
53

64
def main():
75
parser = argparse.ArgumentParser(prog='jenkins',
@@ -45,12 +43,12 @@ def main():
4543

4644
args = parser.parse_args()
4745
try:
48-
jenkins_cli.JenkinsCli(args).run_command(args)
49-
except jenkins_cli.jenkins.JenkinsException as e:
46+
JenkinsCli(args).run_command(args)
47+
except jenkins.JenkinsException as e:
5048
print e
5149
except KeyboardInterrupt:
5250
print "Aborted"
53-
except jenkins_cli.CliException as e:
51+
except CliException as e:
5452
print e
5553
print "Read jenkins --help"
5654
# except Exception as e:

setup.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import os
2+
from setuptools import setup, find_packages
3+
4+
here = os.path.abspath(os.path.dirname(__file__))
5+
with open(os.path.join(here, 'README.md')) as f:
6+
README = f.read()
7+
8+
requires = [ 'pbr>=1.3.0',
9+
'python-jenkins>=0.4.8',
10+
'six>=1.9.0' ]
11+
12+
setup(name='jenkins-cli',
13+
version='0.1',
14+
description='Commandline interface for Jenkins',
15+
long_description=README,
16+
author='Denys Levchenko',
17+
keywords='jenkins, commandline, cli',
18+
packages=find_packages(),
19+
install_requires=requires,
20+
entry_points = {
21+
'console_scripts' : [ 'jenkins-cli = jenkins_cli:main' ]
22+
}
23+
)

0 commit comments

Comments
 (0)