3 # Allmydata Tahoe -- secure, distributed storage grid
5 # Copyright (C) 2008 Allmydata, Inc.
7 # This file is part of tahoe.
9 # See the docs/about.html file for licensing information.
14 from ez_setup import use_setuptools
18 # This invokes our own customized version of ez_setup.py to make sure that
19 # setuptools >= v0.6c8 (a.k.a. v0.6-final) is installed.
21 # setuptools < v0.6c8 doesn't handle eggs which get installed into the CWD
22 # as a result of being transitively depended on in a setup_requires, but
23 # then are needed for the installed code to run, i.e. in an
25 use_setuptools(download_delay=0, min_version="0.6c8")
27 from setuptools import Extension, find_packages, setup
29 # Make the dependency-version-requirement, which is used by the Makefile at
30 # build-time, also available to the app at runtime:
33 shutil.copyfile("_auto_deps.py", os.path.join("src", "allmydata", "_auto_deps.py"))
34 except EnvironmentError:
35 # Nevermind then -- perhaps it is already in place and in any case we can do
40 "Development Status :: 5 - Production/Stable",
41 "Environment :: Console",
42 "Environment :: Web Environment",
43 "License :: OSI Approved :: GNU General Public License (GPL)",
44 "License :: DFSG approved",
45 "License :: Other/Proprietary License",
46 "Intended Audience :: Developers",
47 "Intended Audience :: End Users/Desktop",
48 "Intended Audience :: System Administrators",
49 "Operating System :: Microsoft",
50 "Operating System :: Microsoft :: Windows",
51 "Operating System :: Unix",
52 "Operating System :: POSIX :: Linux",
53 "Operating System :: POSIX",
54 "Operating System :: MacOS :: MacOS X",
55 "Operating System :: Microsoft :: Windows :: Windows NT/2000",
56 "Operating System :: OS Independent",
57 "Natural Language :: English",
58 "Programming Language :: C",
59 "Programming Language :: Python",
61 "Topic :: System :: Systems Administration",
62 "Topic :: System :: Filesystems",
63 "Topic :: System :: Distributed Computing",
64 "Topic :: Software Development :: Libraries",
65 "Topic :: Communications :: Usenet News",
66 "Topic :: System :: Archiving :: Backup",
67 "Topic :: System :: Archiving :: Mirroring",
68 "Topic :: System :: Archiving",
72 VERSIONFILE = "src/allmydata/_version.py"
75 verstrline = open(VERSIONFILE, "rt").read()
76 except EnvironmentError:
77 pass # Okay, there is no version file.
79 VSRE = r"^verstr = ['\"]([^'\"]*)['\"]"
80 mo = re.search(VSRE, verstrline, re.M)
84 print "unable to find version in %s" % (VERSIONFILE,)
85 raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,))
88 """Welcome to the Tahoe project, a secure, decentralized, fault-tolerant
89 filesystem. All of the source code is available under a Free Software, Open
92 This filesystem is encrypted and spread over multiple peers in such a way that
93 it remains available even when some of the peers are unavailable,
94 malfunctioning, or malicious."""
96 miscdeps=os.path.join(os.getcwd(), 'misc', 'dependencies')
97 dependency_links=[os.path.join(miscdeps, t) for t in os.listdir(miscdeps) if t.endswith(".tar")]
99 # By adding a web page to the dependency_links we are able to put new packages
100 # up there and have them be automatically discovered by existing copies of the
101 # tahoe source when that source was built.
102 dependency_links.append("http://allmydata.org/trac/tahoe/wiki/Dependencies")
105 setup_requires.append('pyutil >= 1.3.16') # used by the Windows installer builder, see misc/sub-ver.py
106 setup_requires.append('twisted >= 2.4.0') # for trial, and because foolscap <= 0.2.5 imports it in its setup.py
108 # darcsver is needed only if you want "./setup.py darcsver" to write a new
109 # version stamp in src/allmydata/_version.py, with a version number derived from
111 # http://pypi.python.org/pypi/darcsver
112 setup_requires.append('darcsver >= 1.1.2')
114 # setuptools_darcs is required to produce complete distributions (such as with
115 # "sdist" or "bdist_egg"), unless there is a PKG-INFO file present which shows
116 # that this is itself a source distribution.
117 # http://pypi.python.org/pypi/setuptools_darcs
118 if not os.path.exists('PKG-INFO'):
119 setup_requires.append('setuptools_darcs >= 1.1.0')
123 setup(name='allmydata-tahoe',
125 description='secure, decentralized, fault-tolerant filesystem',
126 long_description=LONG_DESCRIPTION,
127 author='Allmydata, Inc.',
128 author_email='tahoe-dev@allmydata.org',
129 url='http://allmydata.org/',
131 package_dir = {'':'src'},
132 packages=find_packages("src"),
133 classifiers=trove_classifiers,
134 test_suite="allmydata.test",
135 install_requires=_auto_deps.install_requires,
136 include_package_data=True,
137 setup_requires=setup_requires,
138 dependency_links=dependency_links,
139 entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
140 zip_safe=False, # We prefer unzipped for easier access.