Re: BitPim 0.9.13 now available for initial checkout

Adit Panchal <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <[email protected]>
On Mar 18, 2007, at 9:03 PM, Sean Burke wrote:

> Please keep us post on any unexpected behavior.  Specifically, I  
> noticed
> the wxPython tweaks out during the phonebook import screen.  Does  
> it do
> that when you run the source?

I don't have a phone to test BitPim with, but if I import a CSV file,  
I get the following traceback after assigning columns to the data and  
importing it:

Traceback (most recent call last):
   File "/Users/apanchal/Projects/bitpim/trunk/bitpim/src/ 
phonebook.py", line 1481, in Draw
     text, font=self.facename, size=self.facesize)
   File "/Users/apanchal/Projects/bitpim/trunk/bitpim/src/bphtml.py",  
line 488, in drawhtml
     hdc.Render(rect.x, rect.y, 0, False)
   File "//Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/wx-2.8-mac-unicode/wx/html.py", line 1265, in  
Render
     return _html.HtmlDCRenderer_Render(*args, **kwargs)
TypeError: Sequence of integers expected.

Variables by last 8 frames, innermost last

Frame Draw in /Users/apanchal/Projects/bitpim/trunk/bitpim/src/ 
phonebook.py at line 1481
            attr =  <wx.grid.GridCellAttr; proxy of <Swig Object of  
type 'wxGridCellAttr *' at 0x1b0
            text =  u'<font color="#000000"><strike>Joe Schmoe</ 
strike></font>'
          colour =  wx.Colour(0, 0, 0, 255)
              dc =  <wx._gdi.PaintDC; proxy of <Swig Object of type  
'wxPaintDC *' at 0xbfffb0a4> >
            self =  <phonebook.ImportCellRenderer; proxy of <Swig  
Object of type 'wxPyGridCellRender
      isSelected =  0
         rowtype =  0
            grid =  <wx.grid.Grid; proxy of <Swig Object of type  
'wxGrid *' at 0x1cd9600> >
             col =  1
            rect =  wx.Rect(80, 540, 80, 20)
             row =  27

Frame drawhtml in /Users/apanchal/Projects/bitpim/trunk/bitpim/src/ 
bphtml.py at line 488
        basepath =  ''
              dc =  <wx._gdi.PaintDC; proxy of <Swig Object of type  
'wxPaintDC *' at 0xbfffb0a4> >
            html =  u'<font color="#000000"><strike>Joe Schmoe</ 
strike></font>'
             hdc =  <wx.html.HtmlDCRenderer; proxy of <Swig Object of  
type 'wxHtmlDCRenderer *' at 0
            rect =  wx.Rect(82, 541, 76, 18)
               x =  1.6000000000000001
            font =  u'Lucida Grande'
       origscale =  (1.0, 1.0)
            size =  13

Frame Render in //Library/Frameworks/Python.framework/Versions/2.5/ 
lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/html.py at line 1265
            args =  (<wx.html.HtmlDCRenderer; proxy of <Swig Object  
of type 'wxHtmlDCRenderer *' at
          kwargs =  Keys []
                    {}

Also notable is when either running from source or running from my  
build, the Quit function (both menu, dock and Cmd-Q) does not work  
with Python 2.5 and wxPython 2.8.1.1. I have to force quit the  
application. It does work with Python 2.4 and wxPython 2.6.3.3. I  
think the next thing for me to try is wxPython 2.6.3.3 on Python 2.5  
and see if that fixes itself. I have a feeling that it is related to  
wxPython 2.8.1.1 and not Python itself.

> Welcome to my weekend.  APSW links against the shared library of
> sqlite3.  I built it (APSW) using the -static option but couldn't get
> the package to build.  I assume that is because everything else is
> shared and the build script is looking for a dynamic APSW library.   
> Have
> you been able to build a dynamic, universal version of sqlite3?  Many
> have tried (like me) and as far as I know, all have failed.   I got as
> far as building a static universal library, but that doesn't help
> because of the aforementioned problem.  I can't build a universal
> application until I can get a universal sqlite library.

Here is the result of lipo -detailed_info on my version of apsw.so  
(built dynamically via the APSW documentation instructions):

Fat header in: /Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/apsw.so
fat_magic 0xcafebabe
nfat_arch 2
architecture i386
     cputype CPU_TYPE_I386
     cpusubtype CPU_SUBTYPE_I386_ALL
     offset 4096
     size 157368
     align 2^12 (4096)
architecture ppc
     cputype CPU_TYPE_POWERPC
     cpusubtype CPU_SUBTYPE_POWERPC_ALL
     offset 163840
     size 162084
     align 2^12 (4096)

Another library to check would be the native packages, i.e. jaro/ 
winkler and libusb. Compiling Jaro/winkler gives a universal library,  
but libusb doesn't as evidenced by the following lipo info:

Fat header in: /Users/apanchal/Projects/bitpim/trunk/bitpim/src/ 
native/strings/jarow.so
fat_magic 0xcafebabe
nfat_arch 2
architecture i386
     cputype CPU_TYPE_I386
     cpusubtype CPU_SUBTYPE_I386_ALL
     offset 4096
     size 29116
     align 2^12 (4096)
architecture ppc
     cputype CPU_TYPE_POWERPC
     cpusubtype CPU_SUBTYPE_POWERPC_ALL
     offset 36864
     size 24848
     align 2^12 (4096)

input file /Users/apanchal/Projects/bitpim/trunk/bitpim/src/native/ 
usb/_libusb.so is not a fat file
Non-fat file: /Users/apanchal/Projects/bitpim/trunk/bitpim/src/native/ 
usb/_libusb.so is architecture: i386

Any suggestions on making the libusb shared library universal?

Final thoughts:

I think we can only make a universal build if we use a universal  
version of Python (seems obvious enough). That said, the built-in 2.3  
(either on Intel or PPC) is going to be platform specific. I don't  
think at this point it matters which version of Python we use 2.3,  
2.4, or 2.5 as long as it meets that requirement and you have to  
install a framework build in order to have universal Python. Also as  
to licensing issues to redistributables, AFAIK, the Mac OS X build of  
Python does not have any issues like the Windows version which relies  
on some MS .dlls. I believe that was the reason we are not using 2.4  
or above.

Hope that makes sense,

Adit


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.