﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
804	provide binary .egg's for pycryptopp for all supported platforms and versions of Python	arch_o_median	zooko	"= Some System Configuration Information =
{{{
arc@showertimedepot:~/tahoe$ darcs --version
2.0.2 (release)
arc@showertimedepot:~/tahoe$ uname -a
Linux showertimedepot 2.6.18.8-x86_64-linode7 #1 SMP Fri Aug 14 17:14:08 UTC 2009 x86_64 GNU/Linux
arc@showertimedepot:~/tahoe$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 8.10
Release:        8.10
Codename:       intrepid
}}}

= Downloads =
Per [http://allmydata.org/trac/tahoe/wiki/Dev these] instructions I ran:

{{{
darcs get --lazy http://allmydata.org/source/tahoe/trunk-hashedformat tahoe
}}}

I've deviated from the prescribed protocol since the default install docs do not recommend acquiring the source from the darcs repo. [[BR]] Perhaps differences between the tarball and the repo versions generate this bug. [[BR]] To check this I also attempt to build from the tarball in a separate location.

I.E. I ran:
{{{
 wget http://allmydata.org/source/tahoe/releases/allmydata-tahoe-1.5.0.zip
}}}

= Build From Repo =
Per [http://allmydata.org/source/tahoe/trunk/docs/install.html these] instructions I ran:
{{{
~/tahoe$ python ./setup.py build &> from_repo_build_log.txt
}}}
in the ""from-repo"" directory. 

Upon inspection of the output (attached) I see several error-types. [[BR]]

I guess these two to be not-fatal: [[BR]]
 i. ""darcs failed: Not a repository: ..."" and [[BR]]
 i. ""cc1plus: warning:..."" lines are not fatal. [[BR]] 
Following those two error-types the next error is:
{{{
pycryptopp/_pycryptoppmodule.cpp:2:20: error: Python.h: No such file or directory
}}}

= Difference Between First and Second Build Attempts in From-Tarball Version =

In the ""from-tar"" directory I ran:
{{{
python ./setup.py build &> from_tar_build_log_initial.txt
}}}
(Actually I changed the log names to be more descriptive, after the fact.)

I do not notice obvious differences between repo and tar. [[BR]]

I do notice differences between initial and subsequent build-attempts. [[BR]]

(Perhaps I should be writing ""setup-"" vice ""build-"" attempts.)
{{{
arc@showertimedepot:~/tahoe/allmydata-tahoe-1.5.0$ grep zope from_tar_build_log_initial.txt | grep Python.h
src/zope/interface/_zope_interface_coptimizations.c:15:20: error: Python.h: No such file or directory
arc@showertimedepot:~/tahoe/allmydata-tahoe-1.5.0$ grep zope from_tar_build_log_second.txt | grep Python.h
}}} 
(Log names changed after the fact for clarity.)

Intriguingly ""zope"" appears to be missing ""Python.h"" on the first build attempt, this is not reported on subsequent build attempts.[[BR]]   The missing Python.h in pycryptopp is reported in initial and subsequent build attempts:

{{{
arc@showertimedepot:~/tahoe/allmydata-tahoe-1.5.0$ grep pycryp from_tar_build_log_initial.txt | grep Python.h
pycryptopp/_pycryptoppmodule.cpp:2:20: error: Python.h: No such file or directory
arc@showertimedepot:~/tahoe/allmydata-tahoe-1.5.0$ grep pycryp from_tar_build_log_second.txt | grep Python.h
pycryptopp/_pycryptoppmodule.cpp:2:20: error: Python.h: No such file or directory
}}}

= First Versus Second From Repo Setup = 
Is the difference between initial and subsequent setup bugs also [[BR]] seen in the from repo version?
To find out I tested a fresh from-repo setup attempt.

{{{
arc@showertimedepot:~/tahoe-darcs$ darcs get --lazy http://allmydata.org/source/tahoe/trunk-hashedformat tahoe
Finished getting.                           
}}}

{{{
arc@showertimedepot:~/tahoe-darcs/tahoe$ grep -iEe""zope|pycryp"" | grep Python.h from_repo_*
from_repo_initial_setup.txt:src/zope/interface/_zope_interface_coptimizations.c:15:20: error: Python.h: No such file or directory
from_repo_initial_setup.txt:pycryptopp/_pycryptoppmodule.cpp:2:20: error: Python.h: No such file or directory
from_repo_second_setup.txt:pycryptopp/_pycryptoppmodule.cpp:2:20: error: Python.h: No such file or directory
}}}

So the difference between zope and pycryptopp initial vs. [[BR]] second installs generalizes to installs from tar and from repo.

= Bug Interpretation =
It looks like Python.h of pycryptopp is not found so I guess that I lack some necessary dependency.

= Calling All Dependencies =
(Since my bug does not seem to vary between from-repo and from-tar, I stick to from repo from here on.)

Where're these elusive Python.h's?   Sound like C headers to me....

Naive:
{{{
arc@showertimedepot:~/tahoe-darcs/tahoe$ find . -iname ""*Python.h*""
arc@showertimedepot:~/tahoe-darcs/tahoe$ 
}}} 

OK, not surprising since docs say all repo is python, and what's missing is C.   So, my belief that I have a dependency problem grows stronger. 

Following [http://allmydata.org/source/tahoe/trunk/docs/install.html More Details], I learn that I can view ""the canonical list of dependencies"" in _auto_deps.py.

Of course, I cannot run ""tahoe --version"" yet so I skip that advice...

Aha!  A ""complete list of all dependencies...""

{{{
PYTHONPATH=${PYTHONPATH}:./support/lib/python2.5/site-packages/ python -c ""import pkg_resources;print ', '.join([d.project_name+': '+d.version for d in set(pkg_resources.require('allmydata-tahoe'))])""
}}}

{{{
arc@showertimedepot:~/tahoe-darcs/tahoe$ PYTHONPATH=${PYTHONPATH}:./support/lib/python2.5/site-packages/ python -c ""import pkg_resources;print ', '.join([d.project_name+': '+d.version for d in set(pkg_resources.require('allmydata-tahoe'))])""
Traceback (most recent call last):
  File ""<string>"", line 1, in <module>
  File ""/home/arc/tahoe-darcs/tahoe/support/lib/python2.5/site-packages/setuptools-0.6c12dev.egg/pkg_resources.py"", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File ""/home/arc/tahoe-darcs/tahoe/support/lib/python2.5/site-packages/setuptools-0.6c12dev.egg/pkg_resources.py"", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: pycryptopp>=0.5.15
arc@showertimedepot:~/tahoe-darcs/tahoe$ 
}}}

Hmmm....  next step...  submit and wait...  if no help then dissect above expression...   

OK, I did try to dissect a tiny bit:

In ipython interpreter:

{{{
In [1]: import sys

In [2]: sys.path
Out[2]: 
['',
 '/usr/bin',
 '/usr/lib/python2.5',
 '/usr/lib/python2.5/plat-linux2',
 '/usr/lib/python2.5/lib-tk',
 '/usr/lib/python2.5/lib-dynload',
 '/usr/local/lib/python2.5/site-packages',
 '/usr/lib/python2.5/site-packages',
 '/var/lib/python-support/python2.5',
 '/var/lib/python-support/python2.5/IPython/Extensions',
 '/home/arc/.ipython']

In [3]: sys.path.append('./support/lib/python2.5/site-packages/')

In [4]: import pkg_resources
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/home/arc/tahoe-darcs/tahoe/<ipython console> in <module>()

ImportError: No module named pkg_resources
}}}

(And just to be sure I tried above with explicit path name from root to relevant site-packages.)

Which is:
{{{
arc@showertimedepot:~/tahoe-darcs/tahoe$ ls -la ./support/lib/python2.5/site-packages/
total 32
drwxr-xr-x 3 arc arc 4096 2009-09-14 22:32 .
drwxr-xr-x 3 arc arc 4096 2009-09-14 22:30 ..
-rw-r--r-- 1 arc arc   35 2009-09-14 22:32 allmydata-tahoe.egg-link
-rw-r--r-- 1 arc arc  297 2009-09-14 22:30 easy-install.pth
drwxr-xr-x 4 arc arc 4096 2009-09-14 22:32 setuptools-0.6c12dev.egg
-rw-r--r-- 1 arc arc   27 2009-09-14 22:32 setuptools.pth
-rw-r--r-- 1 arc arc 2327 2009-09-14 22:30 site.py
-rw-r--r-- 1 arc arc 1833 2009-09-14 22:30 site.pyc
}}}"	defect	closed	minor	1.8.1	packaging	1.5.0	fixed	binaries install dependency pycryptopp linux x86-64		
