]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - setup.py
setup: fix typo in name of download base for bootstrapping setuptools
[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 # This program is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by the Free
11 # Software Foundation; either version 2 of the License, or (at your option)
12 # any later version, with the added permission that, if you become obligated
13 # to release a derived work under this licence (as per section 2.b), you may
14 # delay the fulfillment of this obligation for up to 12 months.  If you are
15 # obligated to release code under section 2.b of this licence, you are
16 # obligated to release it under these same terms, including the 12-month grace
17 # period clause.  See the COPYING file for details.
18 #
19 # If you would like to inquire about a commercial relationship with Allmydata,
20 # Inc., please contact partnerships@allmydata.com and visit
21 # http://allmydata.com/.
22
23 import sys, re, os.path
24 try:
25     from ez_setup import use_setuptools
26 except ImportError:
27     pass
28 else:
29     if 'cygwin' in sys.platform.lower():
30         min_version='0.6c6'
31     else:
32         # foolscap uses a module-level os.urandom() during import, which
33         # breaks inside older setuptools' sandboxing. 0.6c4 is the first
34         # version which fixed this problem.
35         min_version='0.6c4'
36     download_base = os.path.join('misc', 'dependencies')+os.path.sep
37     use_setuptools(min_version=min_version,
38                    download_base=download_base,
39                    download_delay=0)
40
41 from setuptools import Extension, find_packages, setup
42
43 from calcdeps import install_requires, dependency_links
44
45 trove_classifiers=[
46     "Development Status :: 3 - Alpha", 
47     "Environment :: Console",
48     "Environment :: Web Environment",
49     # "License :: Free Software (GPL variant)", # Not a real acceptable value.  I guess this means we really need to get our licence DFSG/OSI approved.
50     # "License :: Open Source (GPL variant)", # Not a real acceptable value.  I guess this means we really need to get our licence DFSG/OSI approved.
51     "Intended Audience :: Developers", 
52     "Intended Audience :: End Users/Desktop",
53     "Intended Audience :: System Administrators",
54     "Operating System :: Microsoft",
55     "Operating System :: Microsoft :: Windows",
56     "Operating System :: Unix",
57     "Operating System :: POSIX :: Linux",
58     "Operating System :: POSIX",
59     "Operating System :: MacOS :: MacOS X",
60     "Operating System :: Microsoft :: Windows :: Windows NT/2000",
61     "Operating System :: OS Independent", 
62     "Natural Language :: English", 
63     "Programming Language :: C", 
64     "Programming Language :: Python", 
65     "Topic :: Utilities",
66     "Topic :: System :: Systems Administration",
67     "Topic :: System :: Filesystems",
68     "Topic :: System :: Distributed Computing",
69     "Topic :: Software Development :: Libraries",
70     "Topic :: Communications :: Usenet News",
71     "Topic :: System :: Archiving :: Backup", 
72     "Topic :: System :: Archiving :: Mirroring", 
73     "Topic :: System :: Archiving", 
74     ]
75
76
77 # Build _version.py before trying to extract a version from it. If we aren't
78 # running from a darcs checkout, this will leave any pre-existing _version.py
79 # alone.
80 try:
81     os.system(" ".join([sys.executable,
82                        "misc/make-version.py",
83                        "allmydata-tahoe",
84                        '"src/allmydata/_version.py"', # cygwin vs slashes
85                         ]))
86 except Exception, le:
87     pass
88 VERSIONFILE = "src/allmydata/_version.py"
89 verstr = "unknown"
90 if os.path.exists(VERSIONFILE):
91     VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M)
92     verstrline = open(VERSIONFILE, "rt").read()
93     mo = VSRE.search(verstrline)
94     if mo:
95         verstr = mo.group(1)
96     else:
97         print "unable to find version in src/allmydata/_version.py"
98         raise RuntimeError("if _version.py exists, it must be well-formed")
99
100
101 LONG_DESCRIPTION=\
102 """Welcome to the AllMyData "tahoe" project. This project implements a secure,
103 distributed, fault-tolerant storage grid under a Free Software licence.
104
105 The basic idea is that the data in this storage grid is spread over all
106 participating nodes, using an algorithm that can recover the data even if a
107 majority of the nodes are no longer available."""
108
109
110 setup(name='allmydata-tahoe',
111       version=verstr,
112       description='secure, distributed storage grid',
113       long_description=LONG_DESCRIPTION,
114       author='Allmydata, Inc.',
115       author_email='tahoe-dev@allmydata.org',
116       url='http://allmydata.org/',
117       license='GNU GPL v2 or later, plus transitive 12 month grace period; http://allmydata.org/trac/tahoe/browser/COPYING',
118       package_dir = {'':'src'},
119       packages=find_packages("src"),
120       classifiers=trove_classifiers,
121       test_suite="allmydata.test",
122       install_requires=install_requires,
123       include_package_data=True,
124       setup_requires=["setuptools_darcs >= 1.0.5",],
125       dependency_links=dependency_links,
126       entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
127       zip_safe=False, # We prefer unzipped for easier access.
128       )