2007-03-29 21:01:28 +00:00
|
|
|
#! /usr/bin/env python
|
2006-12-05 08:29:26 +00:00
|
|
|
|
2007-04-30 20:06:09 +00:00
|
|
|
# Allmydata Tahoe -- secure, distributed storage grid
|
2007-04-27 20:47:15 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2007 Allmydata, Inc.
|
|
|
|
#
|
|
|
|
# This file is part of tahoe.
|
|
|
|
#
|
2008-01-08 18:45:00 +00:00
|
|
|
# See the docs/about.html file for licensing information.
|
2006-12-05 08:29:26 +00:00
|
|
|
|
2007-12-21 21:42:38 +00:00
|
|
|
import sys, re, os
|
2007-12-22 17:44:47 +00:00
|
|
|
|
|
|
|
miscdeps=os.path.join('misc', 'dependencies')
|
|
|
|
|
2007-11-09 21:58:03 +00:00
|
|
|
try:
|
|
|
|
from ez_setup import use_setuptools
|
|
|
|
except ImportError:
|
|
|
|
pass
|
2007-09-13 01:57:10 +00:00
|
|
|
else:
|
2007-11-09 21:58:03 +00:00
|
|
|
if 'cygwin' in sys.platform.lower():
|
|
|
|
min_version='0.6c6'
|
|
|
|
else:
|
2007-12-11 03:06:59 +00:00
|
|
|
# foolscap uses a module-level os.urandom() during import, which
|
|
|
|
# breaks inside older setuptools' sandboxing. 0.6c4 is the first
|
|
|
|
# version which fixed this problem.
|
|
|
|
min_version='0.6c4'
|
2007-12-20 23:18:14 +00:00
|
|
|
download_base = "file:"+os.path.join('misc', 'dependencies')+os.path.sep
|
2007-12-11 03:17:34 +00:00
|
|
|
use_setuptools(min_version=min_version,
|
2007-12-20 23:13:10 +00:00
|
|
|
download_base=download_base,
|
2007-12-22 17:44:47 +00:00
|
|
|
download_delay=0, to_dir=miscdeps)
|
2007-09-13 21:51:19 +00:00
|
|
|
|
2007-11-10 01:04:19 +00:00
|
|
|
from setuptools import Extension, find_packages, setup
|
2006-12-14 10:25:30 +00:00
|
|
|
|
2007-09-15 22:05:35 +00:00
|
|
|
from calcdeps import install_requires, dependency_links
|
|
|
|
|
2007-04-27 20:47:15 +00:00
|
|
|
trove_classifiers=[
|
|
|
|
"Development Status :: 3 - Alpha",
|
|
|
|
"Environment :: Console",
|
|
|
|
"Environment :: Web Environment",
|
2008-01-08 18:45:00 +00:00
|
|
|
"License :: OSI Approved :: GNU General Public License (GPL)",
|
|
|
|
"License :: DFSG approved",
|
|
|
|
"License :: Other/Proprietary License",
|
2007-04-27 20:47:15 +00:00
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"Intended Audience :: End Users/Desktop",
|
|
|
|
"Intended Audience :: System Administrators",
|
|
|
|
"Operating System :: Microsoft",
|
|
|
|
"Operating System :: Microsoft :: Windows",
|
|
|
|
"Operating System :: Unix",
|
|
|
|
"Operating System :: POSIX :: Linux",
|
|
|
|
"Operating System :: POSIX",
|
|
|
|
"Operating System :: MacOS :: MacOS X",
|
|
|
|
"Operating System :: Microsoft :: Windows :: Windows NT/2000",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
"Natural Language :: English",
|
|
|
|
"Programming Language :: C",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
"Topic :: Utilities",
|
|
|
|
"Topic :: System :: Systems Administration",
|
|
|
|
"Topic :: System :: Filesystems",
|
|
|
|
"Topic :: System :: Distributed Computing",
|
|
|
|
"Topic :: Software Development :: Libraries",
|
|
|
|
"Topic :: Communications :: Usenet News",
|
|
|
|
"Topic :: System :: Archiving :: Backup",
|
|
|
|
"Topic :: System :: Archiving :: Mirroring",
|
|
|
|
"Topic :: System :: Archiving",
|
|
|
|
]
|
2006-12-14 10:25:30 +00:00
|
|
|
|
2007-05-04 03:14:07 +00:00
|
|
|
|
2007-09-12 23:02:23 +00:00
|
|
|
VERSIONFILE = "src/allmydata/_version.py"
|
2007-05-04 03:14:07 +00:00
|
|
|
verstr = "unknown"
|
2007-12-21 21:42:38 +00:00
|
|
|
VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M)
|
|
|
|
try:
|
2007-05-04 03:14:07 +00:00
|
|
|
verstrline = open(VERSIONFILE, "rt").read()
|
2007-12-21 21:42:38 +00:00
|
|
|
except EnvironmentError:
|
|
|
|
pass # Okay, there is no version file.
|
|
|
|
else:
|
2007-05-04 03:14:07 +00:00
|
|
|
mo = VSRE.search(verstrline)
|
|
|
|
if mo:
|
|
|
|
verstr = mo.group(1)
|
|
|
|
else:
|
2007-12-21 21:42:38 +00:00
|
|
|
print "unable to find version in %s" % (VERSIONFILE,)
|
|
|
|
raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,))
|
2007-08-14 20:57:41 +00:00
|
|
|
|
|
|
|
LONG_DESCRIPTION=\
|
2007-10-16 04:35:09 +00:00
|
|
|
"""Welcome to the AllMyData "tahoe" project. This project implements a secure,
|
|
|
|
distributed, fault-tolerant storage grid under a Free Software licence.
|
2006-12-05 08:29:26 +00:00
|
|
|
|
2007-04-30 20:06:09 +00:00
|
|
|
The basic idea is that the data in this storage grid is spread over all
|
2007-04-27 20:47:15 +00:00
|
|
|
participating nodes, using an algorithm that can recover the data even if a
|
2007-08-14 20:57:41 +00:00
|
|
|
majority of the nodes are no longer available."""
|
|
|
|
|
2008-01-01 06:28:31 +00:00
|
|
|
setup_requires = []
|
|
|
|
|
|
|
|
# darcsver is needed only if you want "./setup.py darcsver" to write a new
|
|
|
|
# version stamp in src/allmydata/_version.py, with a version number derived from
|
|
|
|
# darcs history.
|
|
|
|
# http://pypi.python.org/pypi/darcsver
|
|
|
|
setup_requires.append('darcsver >= 1.0.0')
|
|
|
|
|
|
|
|
# setuptools_darcs is required only if you want to use "./setup.py sdist",
|
|
|
|
# "./setup.py bdist", and the other "dist" commands -- it is necessary for them
|
|
|
|
# to produce complete distributions, which need to include all files that are
|
|
|
|
# under darcs revision control.
|
|
|
|
# http://pypi.python.org/pypi/setuptools_darcs
|
|
|
|
setup_requires.append('setuptools_darcs >= 1.0.5')
|
|
|
|
|
2007-08-14 20:57:41 +00:00
|
|
|
setup(name='allmydata-tahoe',
|
|
|
|
version=verstr,
|
|
|
|
description='secure, distributed storage grid',
|
|
|
|
long_description=LONG_DESCRIPTION,
|
2007-04-27 20:47:15 +00:00
|
|
|
author='Allmydata, Inc.',
|
|
|
|
author_email='tahoe-dev@allmydata.org',
|
|
|
|
url='http://allmydata.org/',
|
2008-01-08 18:45:00 +00:00
|
|
|
license='GNU GPL',
|
2007-11-10 01:04:19 +00:00
|
|
|
package_dir = {'':'src'},
|
|
|
|
packages=find_packages("src"),
|
2007-04-27 20:47:15 +00:00
|
|
|
classifiers=trove_classifiers,
|
|
|
|
test_suite="allmydata.test",
|
2007-09-15 22:05:35 +00:00
|
|
|
install_requires=install_requires,
|
2007-11-10 01:04:19 +00:00
|
|
|
include_package_data=True,
|
2008-01-01 06:28:31 +00:00
|
|
|
setup_requires=setup_requires,
|
2007-09-13 22:37:27 +00:00
|
|
|
dependency_links=dependency_links,
|
2007-10-11 10:38:24 +00:00
|
|
|
entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
|
2007-09-13 22:37:55 +00:00
|
|
|
zip_safe=False, # We prefer unzipped for easier access.
|
2007-04-27 20:47:15 +00:00
|
|
|
)
|