diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | Requires | 2 | ||||
-rwxr-xr-x | setup.py | 66 |
3 files changed, 56 insertions, 14 deletions
@@ -1,3 +1,5 @@ +0.7.0: + - Huge refactor [Joshua Harlow] 0.6.4: - support relative path in AuthorizedKeysFile (LP: #970071). 0.6.3: diff --git a/Requires b/Requires new file mode 100644 index 00000000..6a7064af --- /dev/null +++ b/Requires @@ -0,0 +1,2 @@ +Tempita>=0.4 +PrettyTable>=0.4 @@ -1,10 +1,12 @@ -#!/usr/bin/python # vi: ts=4 expandtab # # Distutils magic for ec2-init +# # Copyright (C) 2009 Canonical Ltd. +# Copyright (C) 2012 Yahoo! Inc. # # Author: Soren Hansen <soren@canonical.com> +# Author: Joshua Harlow <harlowja@yahoo-inc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, as @@ -17,24 +19,59 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -from distutils.core import setup + from glob import glob -import os.path -import subprocess + +import os +import re + +from distutils.core import setup +from setuptools import find_packages + def is_f(p): - return(os.path.isfile(p)) + return os.path.isfile(p) + + +def versions(fn="ChangeLog"): + with open(fn, 'r') as fh: + lines = fh.read().splitlines() + versions = [] + for line in lines: + line = line.strip() + if line.startswith("-") or not line: + continue + if not re.match(r"[\d]", line): + continue + line = line.strip(":") + if (re.match(r"^[\d+]\.[\d+]\.[\d+]$", line) or + re.match(r"^[\d+]\.[\d+]$", line)): + versions.append(line) + return versions + + +def requires(fn='Requires'): + requires = [] + with open(fn, 'r') as fh: + lines = fh.read().splitlines() + for line in lines: + line = line.strip() + if not line or line[0] == '#': + continue + else: + requires.append(line) + return requires + setup(name='cloud-init', - version='0.6.3', + version=versions()[0], description='EC2 initialisation magic', author='Scott Moser', author_email='scott.moser@canonical.com', url='http://launchpad.net/cloud-init/', - packages=['cloudinit', 'cloudinit.CloudConfig' ], - scripts=['cloud-init.py', - 'cloud-init-cfg.py', + packages=find_packages(), + scripts=['bin/cloud-init.py', + 'bin/cloud-init-cfg.py', 'tools/cloud-init-per', ], data_files=[('/etc/cloud', glob('config/*.cfg')), @@ -42,11 +79,12 @@ setup(name='cloud-init', ('/etc/cloud/templates', glob('templates/*')), ('/etc/init', glob('upstart/*.conf')), ('/usr/share/cloud-init', []), - ('/usr/lib/cloud-init', + ('/usr/lib/cloud-init', ['tools/uncloud-init', 'tools/write-ssh-key-fingerprints']), - ('/usr/share/doc/cloud-init', filter(is_f,glob('doc/*'))), - ('/usr/share/doc/cloud-init/examples', filter(is_f,glob('doc/examples/*'))), - ('/usr/share/doc/cloud-init/examples/seed', filter(is_f,glob('doc/examples/seed/*'))), + ('/usr/share/doc/cloud-init', filter(is_f, glob('doc/*'))), + ('/usr/share/doc/cloud-init/examples', filter(is_f, glob('doc/examples/*'))), + ('/usr/share/doc/cloud-init/examples/seed', filter(is_f, glob('doc/examples/seed/*'))), ('/etc/profile.d', ['tools/Z99-cloud-locale-test.sh']), ], + install_requires=requires(), ) |