]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - setup.py
setup: update licensing information in setup.py comments and metadata
[tahoe-lafs/tahoe-lafs.git] / setup.py
1 #! /usr/bin/env python
2
3 # Allmydata Tahoe -- secure, distributed storage grid
4
5 # Copyright (C) 2007 Allmydata, Inc.
6
7 # This file is part of tahoe.
8
9 # See the docs/about.html file for licensing information.
10
11 import sys, re, os
12
13 miscdeps=os.path.join('misc', 'dependencies')
14
15 try:
16     from ez_setup import use_setuptools
17 except ImportError:
18     pass
19 else:
20     if 'cygwin' in sys.platform.lower():
21         min_version='0.6c6'
22     else:
23         # foolscap uses a module-level os.urandom() during import, which
24         # breaks inside older setuptools' sandboxing. 0.6c4 is the first
25         # version which fixed this problem.
26         min_version='0.6c4'
27     download_base = "file:"+os.path.join('misc', 'dependencies')+os.path.sep
28     use_setuptools(min_version=min_version,
29                    download_base=download_base,
30                    download_delay=0, to_dir=miscdeps)
31
32 from setuptools import Extension, find_packages, setup
33
34 from calcdeps import install_requires, dependency_links
35
36 trove_classifiers=[
37     "Development Status :: 3 - Alpha", 
38     "Environment :: Console",
39     "Environment :: Web Environment",
40     "License :: OSI Approved :: GNU General Public License (GPL)", 
41     "License :: DFSG approved",
42     "License :: Other/Proprietary License",
43     "Intended Audience :: Developers", 
44     "Intended Audience :: End Users/Desktop",
45     "Intended Audience :: System Administrators",
46     "Operating System :: Microsoft",
47     "Operating System :: Microsoft :: Windows",
48     "Operating System :: Unix",
49     "Operating System :: POSIX :: Linux",
50     "Operating System :: POSIX",
51     "Operating System :: MacOS :: MacOS X",
52     "Operating System :: Microsoft :: Windows :: Windows NT/2000",
53     "Operating System :: OS Independent", 
54     "Natural Language :: English", 
55     "Programming Language :: C", 
56     "Programming Language :: Python", 
57     "Topic :: Utilities",
58     "Topic :: System :: Systems Administration",
59     "Topic :: System :: Filesystems",
60     "Topic :: System :: Distributed Computing",
61     "Topic :: Software Development :: Libraries",
62     "Topic :: Communications :: Usenet News",
63     "Topic :: System :: Archiving :: Backup", 
64     "Topic :: System :: Archiving :: Mirroring", 
65     "Topic :: System :: Archiving", 
66     ]
67
68
69 VERSIONFILE = "src/allmydata/_version.py"
70 verstr = "unknown"
71 VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M)
72 try:
73     verstrline = open(VERSIONFILE, "rt").read()
74 except EnvironmentError:
75     pass # Okay, there is no version file.
76 else:
77     mo = VSRE.search(verstrline)
78     if mo:
79         verstr = mo.group(1)
80     else:
81         print "unable to find version in %s" % (VERSIONFILE,)
82         raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,))
83
84 LONG_DESCRIPTION=\
85 """Welcome to the AllMyData "tahoe" project. This project implements a secure,
86 distributed, fault-tolerant storage grid under a Free Software licence.
87
88 The basic idea is that the data in this storage grid is spread over all
89 participating nodes, using an algorithm that can recover the data even if a
90 majority of the nodes are no longer available."""
91
92 setup_requires = []
93
94 # darcsver is needed only if you want "./setup.py darcsver" to write a new
95 # version stamp in src/allmydata/_version.py, with a version number derived from
96 # darcs history.
97 # http://pypi.python.org/pypi/darcsver
98 setup_requires.append('darcsver >= 1.0.0')
99
100 # setuptools_darcs is required only if you want to use "./setup.py sdist",
101 # "./setup.py bdist", and the other "dist" commands -- it is necessary for them
102 # to produce complete distributions, which need to include all files that are
103 # under darcs revision control.
104 # http://pypi.python.org/pypi/setuptools_darcs
105 setup_requires.append('setuptools_darcs >= 1.0.5')
106
107 setup(name='allmydata-tahoe',
108       version=verstr,
109       description='secure, distributed storage grid',
110       long_description=LONG_DESCRIPTION,
111       author='Allmydata, Inc.',
112       author_email='tahoe-dev@allmydata.org',
113       url='http://allmydata.org/',
114       license='GNU GPL',
115       package_dir = {'':'src'},
116       packages=find_packages("src"),
117       classifiers=trove_classifiers,
118       test_suite="allmydata.test",
119       install_requires=install_requires,
120       include_package_data=True,
121       setup_requires=setup_requires,
122       dependency_links=dependency_links,
123       entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
124       zip_safe=False, # We prefer unzipped for easier access.
125       )