+++ /dev/null
-#!/usr/bin/env python
-
-import os
-import shutil
-import stat
-
-from os.path import exists, join
-
-
-SRCDIR = 'kamaki'
-DSTDIR = 'bin'
-DST = 'kamaki'
-
-FILES = ('config.py', 'utils.py', 'client.py', 'cli.py')
-
-
-def cat(path, dst, skipheader=True):
- dst.write('\n')
-
- in_header = True
- for line in open(path):
- if in_header and line.strip() and not line.startswith('#'):
- in_header = False
-
- if line.startswith('from kamaki.'):
- continue # Skip local imports
-
- if skipheader and in_header:
- continue
-
- dst.write(line)
-
-
-def main():
- if not exists(DSTDIR):
- os.makedirs(DSTDIR)
- dstpath = join(DSTDIR, DST)
-
- dst = open(dstpath, 'w')
-
- dst.write('#!/usr/bin/env python\n')
-
- cat(join(SRCDIR, '__init__.py'), dst, skipheader=False)
-
- for file in FILES:
- cat(join(SRCDIR, file), dst)
-
- dst.close()
-
- # Make file executable
- mode = stat.S_IMODE(os.stat(dstpath).st_mode)
- mode |= 0111
- os.chmod(dstpath, mode)
-
-
-if __name__ == '__main__':
- main()
--- /dev/null
+#!/usr/bin/env python
+
+# Copyright 2011 GRNET S.A. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+#
+# 1. Redistributions of source code must retain the above
+# copyright notice, this list of conditions and the following
+# disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials
+# provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# The views and conclusions contained in the software and
+# documentation are those of the authors and should not be
+# interpreted as representing official policies, either expressed
+# or implied, of GRNET S.A.
+
+import kamaki
+
+from setuptools import setup
+
+
+setup(
+ name='kamaki',
+ version=kamaki.__version__,
+ description='A command-line tool for managing clouds',
+ long_description=open('README.rst').read(),
+ url='http://code.grnet.gr/projects/kamaki',
+ license='BSD',
+ packages=['kamaki'],
+ include_package_data=True,
+ entry_points={
+ 'console_scripts': ['kamaki = kamaki.cli:main']
+ }
+)