From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: 'bzr init-repo .' crashes for lack of module bz2. Help, please! Date: Sun, 3 Jan 2010 17:33:42 +0000 Message-ID: <20100103173342.GA1653@muc.de> References: <20091228170401.GA4553@muc.de> <4B3939AB.7070501@harpegolden.net> <20091229200832.GA5097@muc.de> <20091229205734.GB5097@muc.de> <4B3A957B.9050106@harpegolden.net> <20091231120648.GA2801@muc.de> <4B3CD9A9.9030705@harpegolden.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262539834 2075 80.91.229.12 (3 Jan 2010 17:30:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2010 17:30:34 +0000 (UTC) Cc: Andreas Schwab , emacs-devel@gnu.org To: David De La Harpe Golden Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 03 18:30:27 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NRUFV-0006ub-JF for ged-emacs-devel@m.gmane.org; Sun, 03 Jan 2010 18:28:17 +0100 Original-Received: from localhost ([127.0.0.1]:52015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRUFV-0002eR-Si for ged-emacs-devel@m.gmane.org; Sun, 03 Jan 2010 12:28:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRUEw-0002Wa-To for emacs-devel@gnu.org; Sun, 03 Jan 2010 12:27:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRUEs-0002Tl-54 for emacs-devel@gnu.org; Sun, 03 Jan 2010 12:27:42 -0500 Original-Received: from [199.232.76.173] (port=48762 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRUEr-0002Tf-Vd for emacs-devel@gnu.org; Sun, 03 Jan 2010 12:27:38 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:3200 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NRUEq-0007Nu-Cr for emacs-devel@gnu.org; Sun, 03 Jan 2010 12:27:37 -0500 Original-Received: (qmail 44761 invoked by uid 3782); 3 Jan 2010 17:27:32 -0000 Original-Received: from acm.muc.de (pD9E52F10.dip.t-dialin.net [217.229.47.16]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sun, 03 Jan 2010 18:27:30 +0100 Original-Received: (qmail 16253 invoked by uid 1000); 3 Jan 2010 17:33:42 -0000 Content-Disposition: inline In-Reply-To: <4B3CD9A9.9030705@harpegolden.net> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:119313 Archived-At: Hi, David, On Thu, Dec 31, 2009 at 05:04:41PM +0000, David De La Harpe Golden wrote: > Alan Mackenzie wrote: > >I was lacking this file [bzlib.h], so I downloaded and built the > >latest version of bzip2. > And rebuild python against this version, right, with "bz2" absent from > the list of modules that failed to build this time due to failure to > "find the necessary bits"? Does the "python" to > get a python repl then "import bz2" test succeed now? That's what I did, and no "import bz2" didn't succeed. However, it did once I'd remembered to do "make install" on the newly build Python. [ .... ] > >I still get the same error message, which I don't understand, > >namely: > > bzr: ERROR: exceptions.ImportError: failed to load > > bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a: No module > > named bz2 > >Presumably "bzrlib.repofmt.groupcompress_repo" means the file > >.../bzrlib/repofmt/groupcompress_repo.py, but what, exactly, is a "module > >named bz2"? > In this case, it means a python extension "module" being a python > binding to libbz2 (*). Such extensions are atypical python modules > implemented as C libs rather than python. The C code uses the python C > implementation's ("cpython") C API to act like a python module to python > code running under that implementation, providing additional > python-callable functions and python-usable data types. It's actually a > pretty typical way of extending scripting languages implemented in C, > though python has now also introduced the more Lisp-conventional "FFI" > approach for such things in module "ctypes" (just mentioning for > completeness). > http://docs.python.org/extending/index.html > http://docs.python.org/library/ctypes.html Thanks for this explanation. I've now got bzip2, Python and bzr installed and talking to each other, such that I can carry on with the BzrForEmacsDevs on the Emacs wiki. Thanks! -- Alan Mackenzie (Nuremberg, Germany).