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

Cédric Le Ninivin's avatar
Cédric Le Ninivin committed
5
version = '0.28.2'
Łukasz Nowak's avatar
Łukasz Nowak committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
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
28
      keywords='slapos core',
Łukasz Nowak's avatar
Łukasz Nowak committed
29
      license='GPLv3',
30 31
      url='http://www.slapos.org',
      author='VIFIB',
Łukasz Nowak's avatar
Łukasz Nowak committed
32 33 34 35 36 37
      namespace_packages=['slapos'],
      packages=find_packages(),
      include_package_data=True,
      install_requires=[
      'Flask', # used by proxy
      'lxml', # needed to play with XML trees
38
      'netaddr>=0.7.5', # to play safely with IPv6 prefixes
Łukasz Nowak's avatar
Łukasz Nowak committed
39 40 41 42 43 44 45 46 47 48 49 50
      '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
        ] + additional_install_requires,
      zip_safe=False, # proxy depends on Flask, which has issues with
                      # accessing templates
      entry_points={
        'console_scripts': [
          'slapconsole = slapos.console:run',
51
          'slapos-request = slapos.console:request',
Łukasz Nowak's avatar
Łukasz Nowak committed
52 53 54 55 56 57 58 59
          'slapformat = slapos.format:main',
          'slapgrid = slapos.grid.slapgrid:run',
          'slapgrid-sr = slapos.grid.slapgrid:runSoftwareRelease',
          'slapgrid-cp = slapos.grid.slapgrid:runComputerPartition',
          'slapgrid-ur = slapos.grid.slapgrid:runUsageReport',
          'slapgrid-supervisorctl = slapos.grid.svcbackend:supervisorctl',
          'slapgrid-supervisord = slapos.grid.svcbackend:supervisord',
          'slapproxy = slapos.proxy:main',
Łukasz Nowak's avatar
Łukasz Nowak committed
60
          'bang = slapos.bang:main',
Cédric Le Ninivin's avatar
Cédric Le Ninivin committed
61
          'slapos = slapos.entry:main',
Łukasz Nowak's avatar
Łukasz Nowak committed
62 63
        ]
      },
Łukasz Nowak's avatar
Łukasz Nowak committed
64
      test_suite="slapos.tests",
Łukasz Nowak's avatar
Łukasz Nowak committed
65
    )