Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 106 lines (88 sloc) 3.409 kb
cf0535c @buzztroll adding in all the new files
buzztroll authored
1 __author__ = 'bresnaha'
2
3 import os
4 from setuptools import setup, find_packages
5 import sys
6
7 Version = "0.2"
8
9 if float("%d.%d" % sys.version_info[:2]) < 2.4:
10 sys.stderr.write("Your Python version %d.%d.%d is not supported.\n" % sys.version_info[:3])
11 sys.stderr.write("lantorrent requires Python 2.5 or newer.\n")
12 sys.exit(1)
13
14 setup(name='lantorrent',
15 version=Version,
16 description='An Open Source network protocol for broadcasting large files.',
17 author='Nimbus Development Team',
18 author_email='workspace-user@globus.org',
19 url='http://www.nimbusproject.org/',
20 packages=[ 'pylantorrent', 'pylantorrent.nosetests'],
21 entry_points = {
22 'console_scripts': [
23 'ltserver = pylantorrent.server:main',
24 'ltclient = pylantorrent.client:main',
25 ],
26
27 },
28 download_url ="http://www.nimbusproject.org/downloads/lantorrent-%s.tar.gz" % (Version),
29 keywords = "multicast broadcast network protocol transfer",
30 long_description="""
31 Fast multicast of large files (designed for VM images)
32 """,
33 license="Apache2",
ac0ea09 @priteau We want simplejson < 2.2, not < 2.1.
priteau authored
34 install_requires = ["simplejson < 2.2, >= 1.9"],
cf0535c @buzztroll adding in all the new files
buzztroll authored
35
36 include_package_data = True,
37 package_data = {},
38
39 classifiers=[
40 'Development Status :: 4 - Beta',
41 'Environment :: Console',
42 'Intended Audience :: End Users/Desktop',
43 'Intended Audience :: Developers',
44 'Intended Audience :: System Administrators',
45 'License :: OSI Approved :: Apache Software License',
46 'Operating System :: MacOS :: MacOS X',
47 'Operating System :: Microsoft :: Windows',
48 'Operating System :: POSIX',
49 'Operating System :: POSIX :: Linux',
50 'Programming Language :: Python',
51 'Topic :: System :: Clustering',
52 'Topic :: System :: Distributed Computing',
53 ],
54 )
55
56 # generate the xinitd file and setup messages
57 print ""
58
59 lt_home = os.path.expanduser("~/.lantorrent")
60 if 'LANTORRENT_HOME' in os.environ:
61 lt_home = os.environ['LANTORRENT_HOME']
62
63 ini_template = "etc/lt.ini"
64 dir = os.path.dirname(__file__)
65 if dir:
66 ini_template = dir + "/" + ini_template
67 ini_template = os.path.abspath(ini_template)
2baafc5 @buzztroll creating the lantorrent home directories
buzztroll authored
68 dst_dir = os.path.abspath(lt_home + "/etc")
69 try:
70 os.makedirs(dst_dir)
71 except Exception, ex:
72 print "Warning | %s" % (str(ex))
73 dst = os.path.abspath(dst_dir + "/lt.ini")
cf0535c @buzztroll adding in all the new files
buzztroll authored
74
75 print ""
76 print "======================="
77 print "Copying the configuration file %s to %s" % (ini_template, dst)
78 cp_cmd = "cp %s %s" % (ini_template, dst)
79 rc = os.system(cp_cmd)
80 if rc != 0:
81 raise Exception('Failed to copy the config file %s' % (cp_cmd))
82
83 print "===================================="
84 print "Generating the xinetd file"
85
86 import getpass
87 who = getpass.getuser()
88 server = sys.prefix + "/bin/ltserver"
89
90 xinetd_template = "etc/lantorrent.inet.in"
91 dir = os.path.dirname(__file__)
92 if dir:
93 xinetd_template = dir + "/" + xinetd_template
94
95 f = open(xinetd_template, "r")
96
97 sed_list = [("@PORT@", "2893"), ("@SERVICENAME@", "lantorrent"), ("@WHO@", who), ("@SERVER@", server)]
98 print "please place the following in /etc/xinetd.d/lantorrent"
99 print "============== START WITH THE NEXT LINE =================="
100 for line in f:
101 for (old, new) in sed_list:
102 line = line.replace(old, new)
103 sys.stdout.write(line)
104
9877299 @buzztroll packaging some lantorrent deps with cumulus (same virutal env). expandi...
buzztroll authored
105 print "=============== END WITH THE PREVIOUS LINE ================="
Something went wrong with that request. Please try again.