setup.py 4.29 KB
Newer Older
Łukasz Nowak's avatar
Łukasz Nowak committed
1 2 3
from setuptools import setup, find_packages
import glob
import os
4 5 6

from slapos.version import version

Łukasz Nowak's avatar
Łukasz Nowak committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
name = 'slapos.core'
long_description = open("README.txt").read() + "\n" + \
    open("CHANGES.txt").read() + "\n"

for f in sorted(glob.glob(os.path.join('slapos', 'README.*.txt'))):
  long_description += '\n' + open(f).read() + '\n'

additional_install_requires = []
# Even if argparse is available in python2.7, some python2.7 installations
# do not have it, so checking python version is dangerous
try:
  import argparse
except ImportError:
  additional_install_requires.append('argparse')

setup(name=name,
      version=version,
      description="SlapOS core.",
      long_description=long_description,
      classifiers=[
          "Programming Language :: Python",
        ],
Łukasz Nowak's avatar
Łukasz Nowak committed
29
      keywords='slapos core',
Łukasz Nowak's avatar
Łukasz Nowak committed
30
      license='GPLv3',
31 32
      url='http://www.slapos.org',
      author='VIFIB',
Łukasz Nowak's avatar
Łukasz Nowak committed
33 34 35 36
      namespace_packages=['slapos'],
      packages=find_packages(),
      include_package_data=True,
      install_requires=[
37 38 39 40 41 42 43 44 45 46
          'Flask', # used by proxy
          'lxml', # needed to play with XML trees
          'netaddr>=0.7.5', # to play safely with IPv6 prefixes
          'netifaces', # to fetch information about network devices
          'setuptools', # namespaces
          'supervisor', # slapgrid uses supervisor to manage processes
          'xml_marshaller>=0.9.3', # to unmarshall/marshall python objects to/from
                                   # XML
          'zope.interface', # slap library implementes interfaces
          'zc.buildout',
47
          'cliff',
48
          'requests',
Marco Mariani's avatar
Marco Mariani committed
49
          'ipython',
Marco Mariani's avatar
Marco Mariani committed
50
          'bpython',
Łukasz Nowak's avatar
Łukasz Nowak committed
51
        ] + additional_install_requires,
52 53 54 55 56
      extra_requires={'docs': (
        'Sphinx',
        'repoze.sphinx.autointerface',
        'sphinxcontrib.programoutput'
      ),},
57 58
      tests_require=[
          'pyflakes',
59
          'mock'
60
      ],
Łukasz Nowak's avatar
Łukasz Nowak committed
61 62 63 64
      zip_safe=False, # proxy depends on Flask, which has issues with
                      # accessing templates
      entry_points={
        'console_scripts': [
65
          'slapos-watchdog = slapos.grid.watchdog:main',
66
          'slapproxy = slapos.cli_legacy.proxy_start:main',
67
          'slapos = slapos.cli.entry:main',
68
          # Deprecated entry points
69
          'slapconsole = slapos.cli_legacy.console:console',
70
          'slapformat = slapos.cli_legacy.format:main',
71 72 73
          'slapgrid-sr = slapos.cli_legacy.slapgrid:runSoftwareRelease',
          'slapgrid-cp = slapos.cli_legacy.slapgrid:runComputerPartition',
          'slapgrid-ur = slapos.cli_legacy.slapgrid:runUsageReport',
74 75
          'slapgrid-supervisorctl = slapos.cli_legacy.svcbackend:supervisorctl',
          'slapgrid-supervisord = slapos.cli_legacy.svcbackend:supervisord',
76
          'bang = slapos.cli_legacy.bang:main',
77 78
        ],
        'slapos.cli': [
79
          # Utilities
Marco Mariani's avatar
Marco Mariani committed
80
          'cache lookup = slapos.cli.cache:CacheLookupCommand',
81
          # SlapOS Node commands
Marco Mariani's avatar
Marco Mariani committed
82
          'node bang = slapos.cli.bang:BangCommand',
Marco Mariani's avatar
Marco Mariani committed
83
          'node format = slapos.cli.format:FormatCommand',
84
          'node register = slapos.cli.register:RegisterCommand',
85 86 87 88 89 90
          'node supervisord = slapos.cli.supervisord:SupervisordCommand',
          'node supervisorctl = slapos.cli.supervisorctl:SupervisorctlCommand',
          'node status = slapos.cli.supervisorctl:SupervisorctlStatusCommand',
          'node start = slapos.cli.supervisorctl:SupervisorctlStartCommand',
          'node stop = slapos.cli.supervisorctl:SupervisorctlStopCommand',
          'node restart = slapos.cli.supervisorctl:SupervisorctlRestartCommand',
Marco Mariani's avatar
Marco Mariani committed
91
          'node tail = slapos.cli.supervisorctl:SupervisorctlTailCommand',
92 93 94
          'node report = slapos.cli.slapgrid:ReportCommand',
          'node software = slapos.cli.slapgrid:SoftwareCommand',
          'node instance = slapos.cli.slapgrid:InstanceCommand',
95
          # SlapOS client commands
Marco Mariani's avatar
Marco Mariani committed
96
          'console = slapos.cli.console:ConsoleCommand',
97
          'configure client = slapos.cli.configure_client:ConfigureClientCommand',
98 99
          'proxy start = slapos.cli.proxy_start:ProxyStartCommand',
          'proxy show = slapos.cli.proxy_show:ProxyShowCommand',
100 101
          'supply = slapos.cli.supply:SupplyCommand',
          'remove = slapos.cli.remove:RemoveCommand',
Marco Mariani's avatar
Marco Mariani committed
102
          'request = slapos.cli.request:RequestCommand',
Łukasz Nowak's avatar
Łukasz Nowak committed
103 104
        ]
      },
Łukasz Nowak's avatar
Łukasz Nowak committed
105
      test_suite="slapos.tests",
Łukasz Nowak's avatar
Łukasz Nowak committed
106
    )