-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup.py
44 lines (39 loc) · 1.2 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/python
from setuptools import setup
import distutils.command.install_scripts
import shutil
# idea from http://stackoverflow.com/a/11400431/2139420
class StripExtension(distutils.command.install_scripts.install_scripts):
"""
Class to handle the stripping of .py extensions in for executable file
names making them more user friendly
"""
def run(self):
distutils.command.install_scripts.install_scripts.run(self)
for script in self.get_outputs():
if script.endswith(".py"):
shutil.move(script, script[:-3])
setup(
name="ansible-runner-service",
version=0.8,
description="Ansible runner based REST API",
long_description="Ansible runner based light weight RESTful web service",
author="Paul Cuzner",
author_email="[email protected]",
url="http://github.com/pcuzner/ansible-runner-service",
license="Apache2",
packages=[
"runner_service",
"runner_service/controllers",
"runner_service/services"
],
scripts=[
'ansible_runner_service.py'
],
include_package_data=True,
zip_safe=False,
data_files=[],
cmdclass={
"install_scripts": StripExtension
}
)