Jebagnana Das | 1 Apr 11:47 2010
Picon

Problem in installing PyQt on Mac OS X 10.6.2

Hai everybody,

         when i tried to install PyQt on Mac Os X after installing python 3.1, Qt 4.6.2 and SIP 4.10.1 i encounter the following error when i execute $python3 configure.py command.

Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.7 (licensed under the GNU General Public
License) for Python 3.1 on darwin.

Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? yes
Checking to see if the QtGui module should be built...
Checking to see if the QtHelp module should be built...
Checking to see if the QtMultimedia module should be built...
Checking to see if the QtNetwork module should be built...
Checking to see if the QtOpenGL module should be built...
Checking to see if the QtScript module should be built...
Checking to see if the QtScriptTools module should be built...
Checking to see if the QtSql module should be built...
Checking to see if the QtSvg module should be built...
Checking to see if the QtTest module should be built...
Checking to see if the QtWebKit module should be built...
Checking to see if the QtXml module should be built...
Checking to see if the QtXmlPatterns module should be built...
Checking to see if the phonon module should be built...
Checking to see if the QtAssistant module should be built...
Checking to see if the QtDesigner module should be built...
Qt v4.6.2 free edition is being used.
Qt is built as a framework.
SIP 4.10.1 is being used.
The Qt header files are in /usr/include.
The shared Qt libraries are in /Library/Frameworks.
The Qt binaries are in /Developer/Tools/Qt.
The Qt mkspecs directory is in /usr/local/Qt4.6.
These PyQt modules will be built: QtCore.
The PyQt Python package will be installed in
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages.
PyQt is being built with generated docstrings.
PyQt is being built with 'protected' redefined as 'public'.
The Designer plugin will be installed in
/Developer/Applications/Qt/plugins/designer.
The PyQt .sip files will be installed in
/Library/Frameworks/Python.framework/Versions/3.1/share/sip/PyQt4.
pyuic4, pyrcc4 and pylupdate4 will be installed in
/Library/Frameworks/Python.framework/Versions/3.1/bin.
Generating the C++ source for the QtCore module...
sip: Usage: sip [-h] [-V] [-a file] [-b file] [-c dir] [-d file] [-e] [-g] [-I dir] [-j #] [-k] [-m file] [-o] [-p module] [-r] [-s suffix] [-t tag] [-w] [-x feature] [-z file] [file]
Error: Unable to create the C++ code.

Your help would be much appreciated..

P.S : I haven't had any problems in installing PyQt 4.7 on Mac OS X 10.5.6 though i had difficulty in installing python 3.1

Regards,
Jeba

<div><p>Hai everybody,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when i tried to install PyQt on Mac Os X after installing python 3.1, Qt 4.6.2 and SIP 4.10.1 i encounter the following error when i execute $python3 configure.py command.<br><br>Determining the layout of your Qt installation...<br>
This is the GPL version of PyQt 4.7 (licensed under the GNU General Public<br>License) for Python 3.1 on darwin.<br><br>Type '2' to view the GPL v2 license.<br>Type '3' to view the GPL v3 license.<br>Type 'yes' to accept the terms of the license.<br>
Type 'no' to decline the terms of the license.<br><br>Do you accept the terms of the license? yes<br>Checking to see if the QtGui module should be built...<br>Checking to see if the QtHelp module should be built...<br>
Checking to see if the QtMultimedia module should be built...<br>Checking to see if the QtNetwork module should be built...<br>Checking to see if the QtOpenGL module should be built...<br>Checking to see if the QtScript module should be built...<br>
Checking to see if the QtScriptTools module should be built...<br>Checking to see if the QtSql module should be built...<br>Checking to see if the QtSvg module should be built...<br>Checking to see if the QtTest module should be built...<br>
Checking to see if the QtWebKit module should be built...<br>Checking to see if the QtXml module should be built...<br>Checking to see if the QtXmlPatterns module should be built...<br>Checking to see if the phonon module should be built...<br>
Checking to see if the QtAssistant module should be built...<br>Checking to see if the QtDesigner module should be built...<br>Qt v4.6.2 free edition is being used.<br>Qt is built as a framework.<br>SIP 4.10.1 is being used.<br>
The Qt header files are in /usr/include.<br>The shared Qt libraries are in /Library/Frameworks.<br>The Qt binaries are in /Developer/Tools/Qt.<br>The Qt mkspecs directory is in /usr/local/Qt4.6.<br>These PyQt modules will be built: QtCore.<br>
The PyQt Python package will be installed in<br>/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages.<br>PyQt is being built with generated docstrings.<br>PyQt is being built with 'protected' redefined as 'public'.<br>
The Designer plugin will be installed in<br>/Developer/Applications/Qt/plugins/designer.<br>The PyQt .sip files will be installed in<br>/Library/Frameworks/Python.framework/Versions/3.1/share/sip/PyQt4.<br>pyuic4, pyrcc4 and pylupdate4 will be installed in<br>
/Library/Frameworks/Python.framework/Versions/3.1/bin.<br>Generating the C++ source for the QtCore module...<br>sip: Usage: sip [-h] [-V] [-a file] [-b file] [-c dir] [-d file] [-e] [-g] [-I dir] [-j #] [-k] [-m file] [-o] [-p module] [-r] [-s suffix] [-t tag] [-w] [-x feature] [-z file] [file]<br>
Error: Unable to create the C++ code.<br><br>Your help would be much appreciated.. <br><br>P.S : I haven't had any problems in installing PyQt 4.7 on Mac OS X 10.5.6 though i had difficulty in installing python 3.1<br><br>Regards,<br>Jeba<br></p></div>
Phil Thompson | 1 Apr 11:59 2010

Re: Problem in installing PyQt on Mac OS X 10.6.2

On Thu, 1 Apr 2010 15:17:36 +0530, Jebagnana Das <jebagnanadas <at> gmail.com>
wrote:
> Hai everybody,
> 
>          when i tried to install PyQt on Mac Os X after installing python
> 3.1, Qt 4.6.2 and SIP 4.10.1 i encounter the following error when i
execute
> $python3 configure.py command.
> 
> Determining the layout of your Qt installation...
> This is the GPL version of PyQt 4.7 (licensed under the GNU General
Public
> License) for Python 3.1 on darwin.
> 
> Type '2' to view the GPL v2 license.
> Type '3' to view the GPL v3 license.
> Type 'yes' to accept the terms of the license.
> Type 'no' to decline the terms of the license.
> 
> Do you accept the terms of the license? yes
> Checking to see if the QtGui module should be built...
> Checking to see if the QtHelp module should be built...
> Checking to see if the QtMultimedia module should be built...
> Checking to see if the QtNetwork module should be built...
> Checking to see if the QtOpenGL module should be built...
> Checking to see if the QtScript module should be built...
> Checking to see if the QtScriptTools module should be built...
> Checking to see if the QtSql module should be built...
> Checking to see if the QtSvg module should be built...
> Checking to see if the QtTest module should be built...
> Checking to see if the QtWebKit module should be built...
> Checking to see if the QtXml module should be built...
> Checking to see if the QtXmlPatterns module should be built...
> Checking to see if the phonon module should be built...
> Checking to see if the QtAssistant module should be built...
> Checking to see if the QtDesigner module should be built...
> Qt v4.6.2 free edition is being used.
> Qt is built as a framework.
> SIP 4.10.1 is being used.
> The Qt header files are in /usr/include.
> The shared Qt libraries are in /Library/Frameworks.
> The Qt binaries are in /Developer/Tools/Qt.
> The Qt mkspecs directory is in /usr/local/Qt4.6.
> These PyQt modules will be built: QtCore.

That's the first problem.

> The PyQt Python package will be installed in
>
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages.
> PyQt is being built with generated docstrings.
> PyQt is being built with 'protected' redefined as 'public'.
> The Designer plugin will be installed in
> /Developer/Applications/Qt/plugins/designer.
> The PyQt .sip files will be installed in
> /Library/Frameworks/Python.framework/Versions/3.1/share/sip/PyQt4.
> pyuic4, pyrcc4 and pylupdate4 will be installed in
> /Library/Frameworks/Python.framework/Versions/3.1/bin.
> Generating the C++ source for the QtCore module...
> sip: Usage: sip [-h] [-V] [-a file] [-b file] [-c dir] [-d file] [-e]
[-g]
> [-I dir] [-j #] [-k] [-m file] [-o] [-p module] [-r] [-s suffix] [-t tag]
> [-w] [-x feature] [-z file] [file]
> Error: Unable to create the C++ code.
> 
> Your help would be much appreciated..
> 
> P.S : I haven't had any problems in installing PyQt 4.7 on Mac OS X
10.5.6
> though i had difficulty in installing python 3.1

What's the output when you run configure.py with the --verbose flag?

Phil
detlev | 1 Apr 12:12 2010
Picon

ANN: New eric 5.0 snapshot released

Hi,

I'd like to inform all of you about the immediate availability of a new eric 
5.0 snapshot. It fixes a few bugs and adds these new features.

- added shared editor functions and a simple chat system
- added installation of a .desktop file for Linux systems

It is available via 
http://sourceforge.net/projects/eric-ide/files/eric5/unstable/20100401

Regards
Detlev
--

-- 
Detlev Offenbach
detlev <at> die-offenbachs.de
Phil Thompson | 1 Apr 12:16 2010

Re: crash in sip module when a C++ exception is thrown from a class constructor

On Wed, 31 Mar 2010 23:02:49 +0200, Denis Rivière <denis.riviere <at> cea.fr>
wrote:
> Hi,
> Using sip 4.10 or sip 4.10.1, I have crashes when a C++ exception is
thrown
> 
> from a C++ class constructor. It happens either if the exception is
> declared 
> in the sip binding or not.
> I experienced it on a Linux system (Fedora 12).
> 
> A small example:
> 
> # C++ header:
> #ifndef WORD_H
> #define WORD_H
> 
> class Word {
> public:
>     char *the_word;
> 
>     Word(const char *w);
>     virtual ~Word();
> 
> };
> #endif
> #--
> 
> # C++ implementation:
> #include "word.h"
> #include <string>
> #include <stdexcept>
> #include <string.h>
> #include <stdlib.h>
> 
> using namespace std;
> 
> Word::Word(const char *w) : the_word( strdup( w ) )
> {
>   if( string( w ) == "exception" )
>     throw runtime_error( "exception in constructor" );
> }
> 
> Word::~Word()
> {
>   free( the_word );
> }
> #--
> 
> # sip code:
> %Module word 0
> 
> %Exception std::exception(SIP_Exception) /PyName=StdException/
> {
> %TypeHeaderCode
> #include <exception>
> %End
> %RaiseCode
>         const char *detail = sipExceptionRef.what();
> 
>         SIP_BLOCK_THREADS
>         PyErr_SetString(sipException_StdException, detail);
>         SIP_UNBLOCK_THREADS
> %End
> };
> 
> 
> %Exception std::runtime_error(std::exception) /PyName=RuntimeError/
> {
> %TypeHeaderCode
> #include <stdexcept>
> %End
> %RaiseCode
>         const char *detail = sipExceptionRef.what();
> std::cout << "throw/raise runtime_error: " << detail << std::endl;
> 
>         SIP_BLOCK_THREADS
>         PyErr_SetString(sipException_std_runtime_error, detail);
>         SIP_UNBLOCK_THREADS
> %End
> };
> 
> class Word {
> 
> %TypeHeaderCode
> #include <word.h>
> #include <stdexcept>
> %End
> 
> public:
>     Word(const char *) /* throw( std::runtime_error ) */;
>     virtual ~Word();
> 
> };
> #--
> 
> # test case:
> import word
> w = word.Word( 'toto' ) # doesn't crash
> x = word.Word( 'exception' ) # crashes
> # --
> 
> If I un-comment the throw() on the constructor in the .sip file, it still

> crashes.
> It did not crash using older versions of sip (4.7.x at least).
> It seems to happen after the sip binding code is executed (after 
> init_Word(...) in the sip-generated source), when back in the sip.so
> module. 

Fixed in Hg.

Thanks for the test case.

Phil
_______________________________________________
PyQt mailing list    PyQt <at> riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
linuxoidoz | 1 Apr 12:19 2010
Picon

My first PyQt plasmoid crashes

Hello,

I am trying to write my first plasmoid in PyQt but when I try to view it in plasmaviewer it crashes with
segmentation fault "Executable: plasmoidviewer PID: 23063 Signal: 11 (Segmentation fault)", here's
the log:

"~/Develop/Python/plasmoids> plasmoidviewer qt-converter.plasmoid
plasmoidviewer(23614)/plasma main: setting FormFactor to "planar"
plasmoidviewer(23614)/plasma main: setting Location to "floating"
plasmoidviewer(23614)/plasma main: setting containment to "null"
plasmoidviewer(23614)/plasma main: setting auth policy
plasmoidviewer(23614)/plasma main: just load applet
plasmoidviewer(23614)/plasma FullView::addApplet: adding applet "qt-converter.plasmoid" in "null"
plasmoidviewer(23614)/libplasma Plasma::CoronaPrivate::addContainment: loading of containment
"null" failed.
plasmoidviewer(23614)/kdecore (KSycoca): Trying to open ksycoca from  "/var/tmp/kdecache-linuxoid/ksycoca4"
plasmoidviewer(23614)/libplasma Plasma::AppletPrivate::init: Check your constructor!  You
probably want to be passing in a Service::Ptr  or a QVariantList with a valid storageid as arg[0].
plasmoidviewer(23614)/python (plugin) KPythonPluginFactory::KPythonPluginFactory: KPythonPluginFactory::KPythonPluginFactory()
plasmoidviewer(23614)/python (plugin) KPythonPluginFactory::initialize: Initializing Python interpreter.
plasmoidviewer(23614)/python (plugin) KPythonPluginFactory::initialize: Succesfully
initialized Python interpreter.
plasmoidviewer(23614)/python (plugin) KPythonPluginFactory::create:
KPythonPluginFactory::create iface:  Plasma::AppletScript
plasmoidviewer(23614)/python (plugin) KPythonPluginFactory::create: keyword to be used for finding
the plugin code:  "plasma_scriptengine_python/pyappletscript.py"
plasmoidviewer(23614)/python (plugin) KPythonPluginFactory::create: Path to plugin code is:  "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py"
plasmoidviewer(23614)/python (plugin) KPythonPluginFactory::create: Returning result qobject
plasmoidviewer(23614)/libplasma Plasma::AppletPrivate::setupScriptSupport: setting up script
support, package is in "/home/linuxoid/Develop/Python/plasmoids/qt-converter.plasmoid/" which
is a "Plasmoid" package , main script is "/home/linuxoid/Develop/Python/plasmoids/qt-converter.plasmoid/contents/code/main.py"
plasmoidviewer(23614)/libplasma Plasma::Package::filePath:
"/home/linuxoid/Develop/Python/plasmoids/qt-converter.plasmoid/contents/locale" does not exist
plasmoidviewer(23614)/libplasma Plasma::Package::filePath:
"/home/linuxoid/Develop/Python/plasmoids/qt-converter.plasmoid/contents/config/main.xml"
does not exist
plasmoidviewer(23614)/libplasma Plasma::Package::filePath:
"/home/linuxoid/Develop/Python/plasmoids/qt-converter.plasmoid/contents/ui/config.ui" does
not exist
KCrash: Application 'plasmoidviewer' crashing...
sock_file=/home/linuxoid/.kde4/socket-linuxoid/kdeinit4__0

[1]+  Stopped                 plasmoidviewer qt-converter.plasmoid"

Here's my main.py file below. I have a stand alone application and it works fine. It must be something to do
with plasma. What am I doing wrong? Will greatly appreciate your help. Thank you.

# -*- coding: utf-8 -*-

import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyKDE4.plasma import Plasma
from PyKDE4 import plasmascript

class PyQtConverter(plasmascript.Applet):
    def __init__(self,parent,args=None):
        plasmascript.Applet.__init__(self,parent)

    def init(self):
        self.setHasConfigurationInterface(False)
        self.setAspectRatioMode(Plasma.Square)

        self.theme = Plasma.Svg(self)
        self.theme.setImagePath("widgets/background")
        self.setBackgroundHints(Plasma.Applet.DefaultBackground)

        self.mainWidget = QWidget()
        self.scene = QGraphicsScene()
        self.mainGraphicsWidget = self.scene.addWidget(self.mainWidget)

        self.btnSize = QSize(50, 50)
        self.iconSize = QSize(40, 40)

        self.iconFind = QIcon(":/myresources/icons/search.svg")
        self.iconCheck = QIcon(":/myresources/icons/check.svg")
        self.iconAbout = QIcon(":/myresources/icons/about.svg")

        sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)

        self.btnCheck = QPushButton(self.iconCheck, "", self.mainWidget)
        self.btnCheck.setIconSize(self.iconSize)
        sizePolicy.setHeightForWidth(self.btnCheck.sizePolicy().hasHeightForWidth())
        self.btnCheck.setSizePolicy(sizePolicy)
        self.btnCheck.setMinimumSize(self.btnSize)
        self.btnFind = QPushButton(self.iconFind, "", self.mainWidget)
        self.btnFind.setIconSize(self.iconSize)
        sizePolicy.setHeightForWidth(self.btnFind.sizePolicy().hasHeightForWidth())
        self.btnFind.setSizePolicy(sizePolicy)
        self.btnFind.setMinimumSize(self.btnSize)
        self.btnAbout = QPushButton(self.iconAbout, "", self.mainWidget)
        self.btnAbout.setIconSize(self.iconSize)
        sizePolicy.setHeightForWidth(self.btnAbout.sizePolicy().hasHeightForWidth())
        self.btnAbout.setSizePolicy(sizePolicy)
        self.btnAbout.setMinimumSize(self.btnSize)

        self.hbToolbar = QHBoxLayout()
        self.hbToolbar.sizeConstraint = QLayout.SetDefaultConstraint
        self.hbToolbar.addWidget(self.btnCheck)
        self.hbToolbar.addWidget(self.btnFind)
        self.hbToolbar.addWidget(self.btnAbout)

        self.mainLayout = QVBoxLayout(self.mainWidget)
        self.mainLayout.sizeConstraint = QLayout.SetDefaultConstraint
        self.mainLayout.addLayout(self.hbToolbar)

        self.layout = QGraphicsLinearLayout(Qt.Horizontal, self.applet)
        self.layout.addItem(self.mainGraphicsWidget)

        self.applet.setLayout(self.layout)
        self.resize(125,125)

 
def CreateApplet(parent):
    return PyQtConverter(parent)
TheKumaresan | 1 Apr 12:20 2010
Picon

How do I get the Dock Re-size Signal

Hi,

How do i get dock re size signal.

-kumaresan

<div><p>Hi,<br><br>How do i get dock re size signal.<br><br>-kumaresan<br></p></div>
akumarzen | 1 Apr 13:51 2010
Picon

Re: How do I get the Dock Re-size Signal


any way... i reimplemented resizeEvent of QWidget... and though that I emit
my signal.

TheKumaresan wrote:
> 
> Hi,
> 
> How do i get dock re size signal.
> 
> -kumaresan
> 
> _______________________________________________
> PyQt mailing list    PyQt <at> riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 

--

-- 
View this message in context: http://old.nabble.com/How-do-I-get-the-Dock-Re-size-Signal-tp28106807p28107560.html
Sent from the PyQt mailing list archive at Nabble.com.

projetmbc | 1 Apr 14:21 2010
Picon

How to install QScintilla on Snow Leopard ?

Hello,
I would like to build QScintilla on my Mac Book Pro Snow Leopard. What I have to do ?

I'have already build pyqt for Python 3, with Python 2-6 still existing on my Mac, using the following commands :
--------------------------------------------------------------------------------------------------------------------------------
        python3.1 configure.py -d /Library/Python/3.1/site-packages -b /usr/local/bin --use-arch i386
        make -j 2
        sudo make install
--------------------------------------------------------------------------------------------------------------------------------

Any clue is welcome...

Christophe.

<div><p>Hello,<br>I would like to build QScintilla on my Mac Book Pro Snow Leopard. What I have to do ?<br><br>I'have already build pyqt for Python 3, with Python 2-6 still existing on my Mac, using the following commands :<br>--------------------------------------------------------------------------------------------------------------------------------<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; python3.1 configure.py -d /Library/Python/3.1/site-packages -b /usr/local/bin --use-arch i386<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; make -j 2<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sudo make install<br>--------------------------------------------------------------------------------------------------------------------------------<br><br>Any clue is welcome...<br><br>Christophe.<br></p></div>
Phil Thompson | 1 Apr 14:41 2010

Re: How to install QScintilla on Snow Leopard ?

On Thu,  1 Apr 2010 14:21:43 +0200 (CEST), <projetmbc <at> club-internet.fr>
wrote:
> Hello,
> I would like to build QScintilla on my Mac Book Pro Snow Leopard. What I
> have to do ?
> 
> I'have already build pyqt for Python 3, with Python 2-6 still existing on
> my Mac, using the following commands :
>
--------------------------------------------------------------------------------------------------------------------------------
>         python3.1 configure.py -d /Library/Python/3.1/site-packages
> -b /usr/local/bin --use-arch i386
>         make -j 2
>         sudo make install
>
--------------------------------------------------------------------------------------------------------------------------------
> 
> Any clue is welcome...
> 
> Christophe.

How about the installation instructions?

http://www.riverbankcomputing.com/static/Docs/QScintilla2/index.html

Phil
_______________________________________________
PyQt mailing list    PyQt <at> riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
detlev | 1 Apr 15:59 2010
Picon

ANN: New eric4 plugin versions released

Hi,

I'd like to inform all of you about the immediate availability of new versions 
of these plug-ins.

- PyLint
- CxFreeze

They are available via
http://sourceforge.net/projects/eric-ide/files/eric4-plugins/stable
or by accessing the plug-in repository via the eric4 IDE.

Regards,
Detlev
--

-- 
Detlev Offenbach
detlev <at> die-offenbachs.de

Gmane