From: Alan W. I. <ir...@be...> - 2001-10-31 04:36:50
|
To Alessandro and the plplot development team: With a relatively small amount of work, I got sip and pyqt installed, and after that getting the pyqt plplot gui to work without problems was extremely easy. (See notes at the end). Thanks very much for your help, Alessandro. The only change to existing plplot files is to plmodules.c where no existing function is changed and 3 additional functions to control the gui are patched in by the patch. All the rest is handled by the magic of dynamic loading. As you can see from the edited comments below, two python source files are required to run the gui. In addition, there are the current plmodule.c changes which ultimately, I think should be separated from plmodules.c. That separated source file could then be compiled into a separate shared object that was loaded independently from plmodule.so by the application (See license comments at the end.) The relevant files are attached to this message if you want to play with this gui. Note, example1 is a modification of xw03.py. Ultimately, this should not go into CVS. Instead, I will put my thinking cap on to figure out how to make the required changes for all the xw??.py examples so they can be run either as scripts (probably called from a main script) or from the GUI. I am sure there is lots more that can be done with the GUI, but even in its present preliminary state, there is a source code window and plotting window. So you can enter python commands (or read them from a file and subsequently edit them) in the source code window and run those commands to see what the immediate effect on the plot will be. Once you are satisfied you would currently have to use cut and paste to output the results to a file, but I am sure file output can easily be added as one of the GUI features. Anyhow, this preliminary GUI result seems quite promising to me, and I hope other members of the plplot development team will evaluate it as well. LICENSING: This must be discussed because we don't want any licensing uncertainties or incompatibilities. libqt is GPLed. The way KDE handles this is their libraries and applications that are independent of qt are LGPLed and everything else is GPLed. If we follow a similar approach, I believe there is a way to do it so that only the xw??.py example scripts (assuming I modify them to use the pyqt GUI) would have to be switched from LGPL to GPL. For example, libplplot remains completely independent of qt so it retains its current LGPL status. From a functional perspective the add-on gui functions should probably be separated from plmodules.c in any case, and that way plmodules.c can retain its LGPL license since it also won't depend on qt. Thus, I propose that we ultimately separate out the current plmodules.c add-ons in the patch to plmodules.c and assign a GPL license to that separated C code. (The qplplot.py and prova.py files must also be GPLed.) Will you confirm you are in agreement with this GPL licensing approach, Allesandro? (I am asking you this because I presume you are the principal copyright holder of these plmodules.c add-ons and the added python files, but if not, please make sure the question gets answered by the copyright holder, and please inform me of who the copyright holder is.) That of course means the xw??.py applications that will actually use the add-on GUI shared object and libqt must also be GPLed. Certainly, I am happy if xw??.py are licensed this way. However, when I created those files, I edited a copy of the x??.py examples, which I think were originally created by Geoffrey. Also Rafael made some contributions so I believe I need agreement with both Geoffrey and Rafael for this license change to the xw??.py examples. Aside from the xw??.py license question, we also need to discuss our willingness to accept GPLed code (so long as it is done in a way that is legally acceptable and which does not force us to change our other licenses) into the plplot project. I think with some care (as is employed, e.g., in the KDE project) our principal LGPL licensed material and these GPLed add-ons can live peaceably and legally together. I am willing to take that licensing care by doing the configuration and programming work so the current plmodules.c add-ons are separated into their own GPLed C code file which gets compiled to a separate shared object file. I am most impressed by the promising start for this pyqt GUI and hope to see it as part of PLplot. Let me know what you think of the GUI and also the licensing issues (if I have failed to cover any aspect of them). Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ On Tue, 30 Oct 2001, Alessandro Mirone wrote (shortend by AWI and edited for what he used.) > hello Alan, > I used --with-double, > and specified --with-python=/our/non/trivial/location. > Double libs are necessary for Numeric to work without any problem > of typecasting. > About qt: > -------------- > I use libqt 2.3.1, and my version of python is 2.0.1. > > You get PyQt-2.5.tar.gz and sip-2.5.tar.gz from > http://www.thekompany.com/projects/pykde/download.php3 > > you need the pyqt version that matches your qt, and you must have > the qt headers installed. > > Sip is mandatory. Sip has to be compiled first > ---------------------------------------------- > You get sip options by > ./configure --help > You have to specify the good path to qt directories. > > > The PyQt compilation follows the usual configure path > ----------------------------------------------------- > specifying the variables with_sip_includes, with_sip_libraries and > with_qt_dir > or passing them as options to configure should be enough > > > TESTING > --------------- > I compiled the patched version, put qplplot.py, prova.py and example1 > in the tmp/ melting pot directory where everything gets compiled. > Then you can test by > python prova.py > You can then popup the file menu, choose example1, and run it |