[mnet-devel] patch: build only egtp
Zooko O'Whielacronx
zooko at zooko.com
Tue Apr 6 16:58:08 BST 2004
> Until then, patches e-mailed to the -dev list
> is the way to go.
Ah, but some mail software somewhere adds line-breaks to the file, breaking the
patch. Here is another try with some MIME encapsulation...
-------------- next part --------------
Index: setup.py
===================================================================
RCS file: /cvsroot/mnet/mnet_new/setup.py,v
retrieving revision 1.70
diff -p -u -r1.70 setup.py
--- setup.py 17 Mar 2004 18:23:53 -0000 1.70
+++ setup.py 6 Apr 2004 14:53:35 -0000
@@ -150,16 +150,8 @@ class download(distutils.core.Command):
pypath.append(self.base_dir)
os.environ['PYTHONPATH'] = string.join(pypath, ':')
- self.check_bsddb3()
self.check_cryptopp()
self.install_tarball(
- module_name='twisted',
- url='http://twisted.sourceforge.net/Twisted_NoDocs-1.1.0.tar.gz',
- sha1sum='4d3fec8c26f4ae97364bb6b02caab4514657e636',
- extracted_dirname='Twisted-1.1.0',
- link_to_inner_dir=True
- )
- self.install_tarball(
module_name='libzutil',
url='http://osdn.dl.sourceforge.net/sourceforge/libzutil/libzutil-0.9.11.tar.gz',
sha1sum='ad0788cee7257f0a8e2641bf941d014beafe759b',
@@ -180,7 +172,6 @@ class download(distutils.core.Command):
extracted_dirname='base32-0.9.9',
link_to_inner_dir=False
)
- #self.check_twisted()
# modules from sf.net can be checked out under the username given as
# a param. pretty much everyone on the mnet project has cvs right to
@@ -192,8 +183,6 @@ class download(distutils.core.Command):
# self.check_module('pyutil', ':pserver:anonymous', 'cvs.pyutil.sourceforge.net:/cvsroot/pyutil', 'pyutil_new')
# self.check_module('base32', ':pserver:anonymous', 'cvs.libbase32.sourceforge.net:/cvsroot/libbase32', 'libbase32', False)
- #self.check_module('twisted', ':pserver:anon', 'twistedmatrix.com:/cvs', 'Twisted')
-
def install_tarball(self, module_name, url, sha1sum, extracted_dirname, link_to_inner_dir):
archive_file = urlparse.urlparse(url)[2].split('/')[-1]
my_build_dir = os.path.join(self.base_dir, 'build', extracted_dirname)
@@ -260,49 +249,6 @@ class download(distutils.core.Command):
else:
os.symlink(my_build_dir, module_name)
- def check_bsddb3(self):
- try:
- pybsddbname = None # the name of the pybsddb module (i.e. python2.3/bsddb/__init__.pyc), NOT of the Berkeley DB library (i.e. libdb.so)
- pybsddbver = None
- libdbname = None # the name of the Berkeley DB library (i.e. libdb.so), NOT of the pybsddb module (i.e. python2.3/bsddb/__init__.pyc)
- libdbver = None
-
- import bsddb
- if not hasattr(bsddb, 'db'):
- # We think it's the stdlib bsddb from python version <=2.2:
- raise ImportError, 'The module "bsddb" appears to be the old version. %s' % `bsddb`
- if not hasattr(bsddb, '__version__'):
- raise ImportError, 'The module "bsddb3" appears to be an old or wrongly-installed version. We require bsddb3 >= v3.4.0. %s' % `bsddb`
- pybsddbverstr = bsddb.__version__
- pybsddbverpieces = tuple(pybsddbverstr.split('.'))
- if pybsddbverpieces < (3,4,0,):
- raise ImportError, 'The module "bsddb3" appears to be an old version. We require bsddb3 >= v3.4.0. pybsddbverpieces: %s, %s' % (`pybsddbverpieces`, `bsddb`,)
- pybsddbname = repr(bsddb)
- libdbname = repr(bsddb._db)
- libdbverpieces = bsddb._db.version()
- if libdbverpieces < (3,2,0,):
- raise ImportError, 'The Berkeley DB library appears to be an old version. We require Berkeley DB >= v3.2.0. libdbverpieces: %s, %s' % (repr(libdbverpieces), libdbname,)
-
- print "Okay, we found pybsddb %s, with version tuple %s and libdb %s with version tuple %s\n" % (pybsddbname, pybsddbverpieces, libdbname, libdbverpieces,)
-
- except ImportError, le:
- raise SystemExit, """\
-You don't have the right version of the python module 'bsddb3' installed.
-
-You can find this module's homepage at http://pybsddb.sf.net/
-
-We need version 3.4.0 or greater
-
-If you have Debian you can install it by running
- apt-get install python-bsddb3
-
-If you have RedHat and know how to install this from an RPM please
-email us so we can put instructions here.
-
-Here are some more notes about our attempt to find the module:
-
-%s\n""" % le
-
def check_module(self, name, username, cvs_root, cvs_module, link_to_inner_dir=True):
if self.no_update:
try:
More information about the Mnet-devel
mailing list