#!/usr/bin/python
# -*- encoding: utf-8 -*-

from os import path
from distutils.core import setup

packages = ['nlp_service']
services_to_install = {	'stylo2': 'stylo2_service.py',
						'iobber': 'iobber_service.py',
						'dummy2': 'dummy2_service.py',
						'wsd2': 'wsd2_service.py'}

def read_services_to_install():
	print "Choose wich services to install (comma separated):"
	s_num = 1
	for service in services_to_install.keys():
		print str(s_num) + ": " + service
		s_num += 1

	service_nos = raw_input()
	service_nos = service_nos.split(',')
	if service_nos[0] == '':
		return ([], [])

	services_names = [services_to_install.keys()[int(no) - 1] for no in service_nos]
	services_scripts = [path.join(name, services_to_install[name]) for name in services_names]
	return (services_names, services_scripts)

if __name__ == "__main__":
	services, services_scripts = read_services_to_install()

	setup(name = 'WSTools Service',
	  	version = '1.0',
	  	author = u'Radosław Warzocha',
	  	author_email = 'radoslaw.warzocha@gmail.com',
	  	url = 'git@nlp.pwr.wroc.pl:wstools',
	  	download_url = 'git@nlp.pwr.wroc.pl:wstools',
	  	description = 'Simple setup for quick implementation of WSTools services',

	  	packages = packages + services,
	  	scripts = services_scripts
		)
