Ticket #20236 (closed defect: worksforme)
bzr build fails for lack of python 2.5 zlib
| Reported by: | jim@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Port: | bzr |
Description
On Leopard, using Python 2.6.1 and without zlib installed, the bzr build fails like so:
---> Building bzr
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1" && /opt/local/bin/python2.5 setup.py --no-user-cfg build " returned error 1
Command output: infogen_mod.infogen(options, outfile)
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/tools/doc_generate/autodoc_man.py", line 52, in infogen
outfile.write(man_escape(getcommand_list(params)))
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/tools/doc_generate/autodoc_man.py", line 77, in getcommand_list
for cmd_name in command_name_list():
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/tools/doc_generate/autodoc_man.py", line 68, in command_name_list
command_names = bzrlib.commands.builtin_command_names()
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/commands.py", line 147, in builtin_command_names
return _builtin_commands().keys()
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/commands.py", line 135, in _builtin_commands
import bzrlib.builtins
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/builtins.py", line 5573, in <module>
from bzrlib.foreign import cmd_dpush
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/foreign.py", line 21, in <module>
from bzrlib.branch import (
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/branch.py", line 1977, in <module>
__format7 = BzrBranchFormat7()
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/branch.py", line 1825, in __init__
RepositoryFormatKnitPack5RichRoot()
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/lazy_import.py", line 122, in __call__
obj = _replace()
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/lazy_import.py", line 89, in _replace
obj = factory(self, scope, name)
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/lazy_import.py", line 192, in _import
module = __import__(module_python_path, scope, scope, [member])
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/repofmt/pack_repo.py", line 62, in <module>
from bzrlib.btree_index import (
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_bzr/work/bzr-1.16.1/bzrlib/btree_index.py", line 27, in <module>
import zlib
ImportError: No module named zlib
There's a stub port for py25-zlib whose description says "This is a stub. zlib is now built with python25". Installing that doesn't seem to help:
> sudo port install py25-zlib Password: ---> Fetching py25-zlib ---> Verifying checksum(s) for py25-zlib ---> Extracting py25-zlib ---> Configuring py25-zlib ---> Building py25-zlib ---> Staging py25-zlib into destroot ---> Installing py25-zlib @2.5.4_1 ---> Activating py25-zlib @2.5.4_1 ---> Cleaning py25-zlib > /opt/local/bin/python2.5 Python 2.5.4 (r254:67916, May 27 2009, 15:25:37) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import zlib Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named zlib >>> exit
Here's some info on what I've got installed:
> port installed | grep '^ py' py-tkinter @2.4.6_0 (active) py25-crypto @2.0.1_0 (active) py25-curl @7.19.0_0 (active) py25-docutils @0.5_0 (active) py25-hashlib @2.5.4_0 (active) py25-libxml2 @2.6.21_1 (active) py25-paramiko @1.7.4_0 (active) py25-pyrex @0.9.8.5_0 (active) py25-zlib @2.5.4_1 (active) python24 @2.4.6_3+darwin_9+macosx (active) python25 @2.5.4_1+darwin_9+macosx python25 @2.5.4_3+darwin_9+macosx (active) python26 @2.6.1_0+darwin_9 python26 @2.6.1_2 (active) python_select @0.2.1_0+darwin_9 (active)
FWIW, zlib is present for python2.4 and python2.6
--j
Change History
Note: See
TracTickets for help on using
tickets.


You need to update your python25, python25 @2.5.4_6 is the latest and has the zlib module: