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 # On cygwin there was a permissions error that was fixed in 0.6c6. (Also
19 # foolscap uses a module-level os.urandom() during import, which breaks
20 # inside older setuptools' sandboxing. 0.6c4 is the first version which
21 # fixed this problem.)
22 use_setuptools(min_version='0.6c6')
24 from setuptools import Extension, find_packages, setup
26 # Make the dependency-version-requirement, which is used by the Makefile at
27 # build-time, also available to the app at runtime:
30 shutil.copyfile("_auto_deps.py", os.path.join("src", "allmydata", "_auto_deps.py"))
31 except EnvironmentError:
32 # Nevermind then -- perhaps it is already in place and in any case we can do
37 "Development Status :: 4 - Beta",
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",
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",
69 VERSIONFILE = "src/allmydata/_version.py"
72 verstrline = open(VERSIONFILE, "rt").read()
73 except EnvironmentError:
74 pass # Okay, there is no version file.
76 VSRE = r"^verstr = ['\"]([^'\"]*)['\"]"
77 mo = re.search(VSRE, verstrline, re.M)
81 print "unable to find version in %s" % (VERSIONFILE,)
82 raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,))
85 """Welcome to the Tahoe project, a secure, decentralized, fault-tolerant
86 filesystem. All of the source code is available under a Free Software, Open
89 This filesystem is encrypted and spread over multiple peers in such a way that
90 it remains available even when some of the peers are unavailable,
91 malfunctioning, or malicious."""
93 miscdeps=os.path.join(os.getcwd(), 'misc', 'dependencies')
94 dependency_links=[os.path.join(miscdeps, t) for t in os.listdir(miscdeps) if t.endswith(".tar")]
96 # By adding a web page to the dependency_links we are able to put new packages
97 # up there and have them be automatically discovered by existing copies of the
98 # tahoe source when that source was built.
99 dependency_links.append("http://allmydata.org/trac/tahoe/wiki/Dependencies")
103 # darcsver is needed only if you want "./setup.py darcsver" to write a new
104 # version stamp in src/allmydata/_version.py, with a version number derived from
106 # http://pypi.python.org/pypi/darcsver
107 setup_requires.append('darcsver >= 1.1.2')
109 # setuptools_darcs is required to produce complete distributions (such as with
110 # "sdist" or "bdist_egg"), unless there is a PKG-INFO file present which shows
111 # that this is itself a source distribution.
112 # http://pypi.python.org/pypi/setuptools_darcs
113 if not os.path.exists('PKG-INFO'):
114 setup_requires.append('setuptools_darcs >= 1.1.0')
118 setup(name='allmydata-tahoe',
120 description='secure, decentralized, fault-tolerant filesystem',
121 long_description=LONG_DESCRIPTION,
122 author='Allmydata, Inc.',
123 author_email='tahoe-dev@allmydata.org',
124 url='http://allmydata.org/',
126 package_dir = {'':'src'},
127 packages=find_packages("src"),
128 classifiers=trove_classifiers,
129 test_suite="allmydata.test",
130 install_requires=_auto_deps.install_requires,
131 include_package_data=True,
132 setup_requires=setup_requires,
133 dependency_links=dependency_links,
134 entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
135 zip_safe=False, # We prefer unzipped for easier access.