Re: [PyQt] Symbol not found: _sipQtConnect (Qt5 and PyQt 4.10 on OSX, 32 bit)

2013-03-18 Thread Glenn Ramsey

On 18/03/13 17:38, Phil Thompson wrote:

On Mon, 18 Mar 2013 13:36:51 +1300, Glenn Ramsey g...@componic.co.nz
wrote:

On 18/03/13 11:18, Phil Thompson wrote:

On Mon, 18 Mar 2013 08:17:18 +1300, Glenn Ramsey g...@componic.co.nz
wrote:

On 16/03/13 21:56, Phil Thompson wrote:

On Sat, 16 Mar 2013 14:16:08 +1300, Glenn Ramsey g...@componic.co.nz
wrote:

On 15/03/13 22:07, Phil Thompson wrote:

On Fri, 15 Mar 2013 15:51:00 +1300, Glenn Ramsey

g...@componic.co.nz

wrote:

Hi,

I have built a 32 bit version of PyQt on OSX (10.8.2) using Qt5,

but

it

doesn't
work:



Make sure the qpy libraries are being built as you expect (ie. 32

bits

rather than 64), ie. that your change to macx-clang-32 is being

applied

to
everything.


Phil
   

Thanks Phil, that does appear to be the problem. QtCore is being built

as

64
bit, everything else as 32 bit (this is in a freshly untarred dir):

$find . -name '*.o' | xargs file

./pylupdate/fetchtr.o:
Mach-O object i386



./qpy/QtCore/moc_qpycore_pyqtproxy.o:
Mach-O 64-bit object



8

What do I need to do to fix it?

Glenn


As we are talking hacks here anyway...

Edit your installed sipconfig.py and change the value of 'platform' in
_pkg_config to 'macx-clang-32'. Then back out all your related changes

to

PyQt's configure.py.

In PyQt's new build system (4.10.1 hopefully) you will just be able to
pass --spec macx-clang-32 to its configure.py.

Phil



It is already set to that.

$ more


/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sipconfig.py


...
# These are installation specific values created when SIP was

configured.

_pkg_config = {
  'arch':   'i386',
  'default_bin_dir':
'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin',
  'default_mod_dir':


'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages',

  'default_sip_dir':
'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/share/sip',
  'deployment_target':  '',
  'platform':   'macx-clang-32',
  'py_conf_inc_dir':


'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',

  'py_inc_dir':


'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',

  'py_lib_dir':


'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config',

  'py_version': 0x020703,
  'sip_bin':
'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/sip',
  'sip_config_args':'--arch i386 --platform macx-clang-32',
  'sip_inc_dir':


'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',

  'sip_mod_dir':


'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages',

  'sip_version':0x040e04,
  'sip_version_str':'4.14.4',
  'universal':  ''
}
...


In your original report you stated that sip was built with just '--arch
i386'. '--platform macx-clang-32' is not supported and configure.py will
generate an error message if used, so I don't see how that configuration
could be created.


Oops, yes, sorry for forgetting about that. It did give an error so I copied the 
spec from Qt5. I thought I had backed that out, but obviously I didn't.



With a clean PyQt, set the QMAKESPEC environment variable to macx-clang-32
and then run configure.py. That works for me.

Phil


That works for me too, thanks!

Cheers
Glenn

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Python (3) + PyQt setup builder

2013-03-18 Thread Pietro Moras





I wander if I could be
suggested a valid, professional setup builder, Python (3) and PyQt
compatible, primarily aimed at the Windows platform. I've heard
such names as PyInstaller--but I realized it isn't Py3
compatible--then cx_Freeze and py2exe... Well, what's your related
experience? Thanks.

 - P.M.



  ___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] PyQt4 installer on Win7

2013-03-18 Thread Detlev Offenbach
Hello,

I tried to use PyQt4 on Windows 7 using the Python 3.3 and Qt5 
installer. The installation worked ok. However, when I tried a 
'from PyQt4 import Qsci' I got an error saying, that the DLL 
cannot be found. The installer for Qt4 is ok and works fine.

Regards,
Detlev-- 
*Detlev Offenbach*
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Best project layout for translation?

2013-03-18 Thread Lee Harr

 When I move the translations to data/translations/
 Qt Linguist can no longer find the .ui file to show the nice
 preview of the form.


I figured out a workaround for this.

ln -s ../../data data/translations/data

Lets Qt Linguist find the .ui files.

Not sure how well that works inside of a mercurial
software repo -- especially if it is cloned to non-unix
systems -- but I am going to give it a try.

  
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] problem with threaded ftp and QFtp.close()

2013-03-18 Thread Brian Knudson
I'm running multiple instances of QFtp in multiple QThreads so I can download 
in multiple streams at the same time.

If I leave out ftp.close() (where ftp is a QFtp), all my threads properly emit 
a finished signal.  This is great, but it leaves the ftp user logged into my 
ftp server, eventually hitting a max_connections limit (on the ftp server), 
which prevents the remaining ftp transfers from starting.  When the program 
exits, the connections do close.

If I follow my ftp.get(...) (there is one per thread) with an ftp.close(), I 
can see the connections closing on my ftp server, I never hit max_connections 
on the ftp server, every download completes, but the threads never emit a 
finished signal (likely because the QFtp never emits a done signal), so the 
rest of the application doesn't behave properly.

I haven't made an example, as an example would require a fair amount of effort. 
 I'm wondering if anyone else has seen this or would have an idea of special 
handling required for the .close() method of QFtps in threads. Maybe it using 
ftp.close() implies a done signal  one must be manually emitted by catching 
the close in the ftp.commandFinished signal handler?

At the end of the day, the QThread's run method looks something like:

self.ftp = QtNetwork.QFtp()
self.ftp.commandFinished.connect(self.ftpCommandFinished)
self.ftp.dataTransferProgress.connect(self.ftpDataTransferProgress)
self.ftp.connectToHost(url.host(), url.port(21))
self.ftp.login(url.userName(), url.password())
self.ftp.get(url.path(), self.out_file)
self.ftp.close()


Thanks,
-Brian

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt