[mnet-devel] patch: build only egtp

Zooko O'Whielacronx zooko at zooko.com
Tue Apr 6 16:54:13 BST 2004


This patch is for the MMIM company, who wants to build mnet_new/egtp without
building the rest of Mnet.  It would be nice if the build system had a way to
do this simply, i.e. "./setup.py build egtp" or so.  Of course it would ideally
also need "./setup.py download egtp".

Another thing that would be nice is if we used a revision control tool to keep
track of this patch, and related patches, without pushing this patch onto the
Mnet hackers who don't want it.  Until then, patches e-mailed to the -dev list
is the way to go.

--Z


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:


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel




More information about the Mnet-devel mailing list