Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-22 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José   The right fix is to take some code from twisted,
José 
http://twistedmatrix.com/trac/browser/trunk/twisted/python/compat.py?rev=14178format=txt

José So if os.walk is not defined we define it. Conversely, the right
José fix for configure.py is to define the missing functions, this
José implies that the code will be the same everywhere and it is
José easier to maintain.

José I am leaving now, I don't have time to commit this. I would need
José some time to guarantee that the code is correct, basically that
José we import the right modules in python 2.2.

José The decision is your Jean-Marc. 

This looks like a good plan, Jose'.

JMarc



Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-22 Thread Jean-Marc Lasgouttes
> "José" == José Matos <[EMAIL PROTECTED]> writes:

José>   The right fix is to take some code from twisted,
José> 
http://twistedmatrix.com/trac/browser/trunk/twisted/python/compat.py?rev=14178=txt

José> So if os.walk is not defined we define it. Conversely, the right
José> fix for configure.py is to define the missing functions, this
José> implies that the code will be the same everywhere and it is
José> easier to maintain.

José> I am leaving now, I don't have time to commit this. I would need
José> some time to guarantee that the code is correct, basically that
José> we import the right modules in python 2.2.

José> The decision is your Jean-Marc. 

This looks like a good plan, Jose'.

JMarc



Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Wednesday 20 September 2006 13:57, Rainer Dorsch wrote:
 José,

 did you apply this patch. I compiled 1.4.3svn and still get

 Checking whether TeX allows spaces in file names...
 Traceback (most recent call last):

 File
 /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py,
 line 730, in ?
 checkTeXAllowSpaces()

 File
 /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py,
 line 655, in checkTeXAllowSpaces
 if 'working' in latex_out:
 TypeError: 'in string' requires character as left operand
 LyX: Done!

  The patch I sent has this issue fixed. I send the patch again attached. The 
patch is against the latest svn version.

  Could you try and see if the attached patch works. It is the only way to ask 
Jean-Marc to included it in the stable series.

  This code only applies to 1.4.x since for 1.5.x we require python 2.3 where 
this code runs.

 Apparently the support for QT 3.0.5 patch was applied by Enrico.

 Thanks,
 Rainer

-- 
José Abílio
Index: configure.py
===
--- configure.py	(revision 15093)
+++ configure.py	(working copy)
@@ -106,7 +106,7 @@
 os.close(fd)
 inpname = cmdOutput('cygpath -m ' + tmpfname)
 latex_out = cmdOutput(r'latex \nonstopmode\input{%s}' % inpname)
-if 'Error' in latex_out:
+if latex_out.find('Error') != -1:
 print configure: TeX engine needs posix-style paths in latex files
 windows_style_tex_paths = 'false'
 else:
@@ -579,7 +579,10 @@
 for line in open('chkconfig.vars').readlines():
 key, val = re.sub('-', '_', line).split('=')
 val = val.strip()
-values[key] = val.strip(')
+tmp = val.split(')
+while tmp and not tmp[0]: tmp = tmp[1:]
+while tmp and not tmp[-1]: tmp = tmp[:-1]
+values[key] = '.join(tmp)
 # chk_fontenc may not exist 
 try:
 addToRC(r'\font_encoding %s' % values[chk_fontenc])
@@ -652,7 +655,7 @@
 latex_out = cmdOutput(LATEX + r \nonstopmode\input{\a b\} )
 else:
 latex_out = cmdOutput(LATEX + r '\nonstopmode\input{a b}' )
-if 'working' in latex_out:
+if latex_out.find('working') != -1:
 print 'yes'
 tex_allows_spaces = 'true'
 else:


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José   The patch I sent has this issue fixed. I send the patch again
José attached. The patch is against the latest svn version.

José   Could you try and see if the attached patch works. It is the
José only way to ask Jean-Marc to included it in the stable series.

I'd like this patch to go in 1.4.3. Jose', if you feel confident
that it improves the situation, please apply. We'll apply another one
if problems remain.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Stephan Witt

Jean-Marc Lasgouttes wrote:

José == José Matos [EMAIL PROTECTED] writes:



José   The patch I sent has this issue fixed. I send the patch again
José attached. The patch is against the latest svn version.

José   Could you try and see if the attached patch works. It is the
José only way to ask Jean-Marc to included it in the stable series.

I'd like this patch to go in 1.4.3. Jose', if you feel confident
that it improves the situation, please apply. We'll apply another one
if problems remain.


I've successfully tested the patch on my good old SuSE 8.1.
Without the patch I failed to configure.py my user directory
with the exception in checkTeXAllowSpaces(). After applying the
patch it is fine.

Regards,

Stephan

% ../lyx-1.4.x/configure --with-frontend=qt
...
checking for python... /usr/bin/python
checking for python version... 2.2
checking for python platform... linux2
...
Configuration
  Host type:  i686-pc-linux-gnu
  Special build flags:assertions warnings  use-ispell
  C   Compiler:   gcc
  C   Compiler LyX flags:
  C   Compiler flags: -W -Wall   -I/usr/X11R6/include -g -O
  C++ Compiler:   g++ (3.2.3)
  C++ Compiler LyX flags:  -fno-exceptions
  C++ Compiler flags: -W -Wall   -I/usr/X11R6/include -g -O
  Linker flags:
  Linker user flags:
  Qt Frontend:
  Qt version:   3.0.5
  Packaging:  posix
  LyX binary dir: /usr/local/bin
  LyX files dir:  /usr/local/share/lyx

--



Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
 Stephan == Stephan Witt [EMAIL PROTECTED] writes:

Stephan Jean-Marc Lasgouttes wrote:
 José == José Matos [EMAIL PROTECTED] writes:

José The patch I sent has this issue fixed. I send the patch again
José attached. The patch is against the latest svn version.

José Could you try and see if the attached patch works. It is the
José only way to ask Jean-Marc to included it in the stable series.
  I'd like this patch to go in 1.4.3. Jose', if you feel confident
 that it improves the situation, please apply. We'll apply another
 one if problems remain.

Stephan I've successfully tested the patch on my good old SuSE 8.1.
Stephan Without the patch I failed to configure.py my user directory
Stephan with the exception in checkTeXAllowSpaces(). After applying
Stephan the patch it is fine.

Thanks. Jose', please apply.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Stephan Witt

Jean-Marc Lasgouttes wrote:

José == José Matos [EMAIL PROTECTED] writes:



José   The patch I sent has this issue fixed. I send the patch again
José attached. The patch is against the latest svn version.

José   Could you try and see if the attached patch works. It is the
José only way to ask Jean-Marc to included it in the stable series.

I'd like this patch to go in 1.4.3. Jose', if you feel confident
that it improves the situation, please apply. We'll apply another one
if problems remain.


I've just detected another phyton problem.
The script lib/scripts/TeXFiles.py failed with

Indexing files of type cls
Traceback (most recent call last):
  File /home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py, line 110, in ?
for root,path,files in os.walk(dir):
AttributeError: 'module' object has no attribute 'walk'
Menu warning: menu entries Einstellungen...|i and TeX Information|I share 
the same shortcut.

Indexing files of type cls
Traceback (most recent call last):
  File /home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py, line 110, in ?
for root,path,files in os.walk(dir):
AttributeError: 'module' object has no attribute 'walk'
Indexing files of type cls
Traceback (most recent call last):
  File /home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py, line 110, in ?
for root,path,files in os.walk(dir):
AttributeError: 'module' object has no attribute 'walk'


Regards,
Stephan

--



Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 10:01, Jean-Marc Lasgouttes wrote:
 Thanks. Jose', please apply.

  I will do it Jean-Marc.

  Suse (I always forget the proper capitalisation) 8.1 was released in October 
2002, the same applies to Redhat 8.0. Both distributions support python 2.2. 
Debian 3.0 release at almost the same time supports 2.1.3. We are then 
supporting 4 years old distribution, a conservative approach.

  Given this, I think that we can raise the bar and require python 2.2 (2.1.3 
if really necessary) for lyx 1.4.x. What do you think?

 JMarc

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Juergen Spitzmueller
José Matos wrote:
 Suse (I always forget the proper capitalisation)

Novell also ;-)

Jürgen


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 10:08, Stephan Witt wrote:

 I've just detected another phyton problem.
 The script lib/scripts/TeXFiles.py failed with

 AttributeError: 'module' object has no attribute 'walk'
 Indexing files of type cls
 Traceback (most recent call last):
File /home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py, line 110,
 in ? for root,path,files in os.walk(dir):
 AttributeError: 'module' object has no attribute 'walk'

  Same problem, this feature appeared in python 2.3
http://docs.python.org/lib/os-file-dir.html

  I will have a look into it.

 Regards,
 Stephan

 --

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José   Given this, I think that we can raise the bar and require
José python 2.2 (2.1.3 if really necessary) for lyx 1.4.x. What do
José you think?

I can agree with that. I think we should have decided that for 1.4.0,
actually.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 10:01, Jean-Marc Lasgouttes wrote:
 Thanks. Jose', please apply.

  I committed the patch. But I did not change status.14x, where should this 
entry go?

 JMarc

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José On Thursday 21 September 2006 10:01, Jean-Marc Lasgouttes wrote:
 Thanks. Jose', please apply.

José   I committed the patch. But I did not change status.14x, where
José should this entry go?

In the misc section at the end. You should document that we require
2.2 now (in README and INSTALL).

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 12:00, Jean-Marc Lasgouttes wrote:

 In the misc section at the end. You should document that we require
 2.2 now (in README and INSTALL).

  Something like the following attached patch?

  We should also rework the test in configure.ac from
# Check for installed python
AM_PATH_PYTHON(1.5.2,, :)

to
AM_PATH_PYTHON(2.2.0,,)

  That is it should fail if python 2.2 is not present, since we require it in 
several places...

  Since we are late in the game I understand if we don't change the last part, 
but we should for further releases.

 JMarc

-- 
José Abílio
Index: status.14x
===
--- status.14x	(revision 15105)
+++ status.14x	(working copy)
@@ -174,6 +174,8 @@
 
 * Miscellaneous
 
+- LyX requires now python 2.2 to work properly.
+
 - Display LaTeX package checking results faster during configuration.
 
 - Log the output of configure.py to a log file configure.log.
Index: INSTALL
===
--- INSTALL	(revision 15105)
+++ INSTALL	(working copy)
@@ -114,9 +114,7 @@
 as. Otherwise, LyX will not be able to run a number of tests. Note
 that users can run these tests manually with EditReconfigure.
 
-  o Python 1.5.2 or newer installed to be able to import older LyX files
-with the lyx2lyx script (this script is called automatically when
-opening a file).
+  o Python 2.2 or newer installed.
 
 
 Creating the Makefile
Index: README
===
--- README	(revision 15105)
+++ README	(working copy)
@@ -32,7 +32,7 @@
 
 A decent LaTeX2e installation (e.g. teTeX for unix) not older
than 1995/12/01.
-Python 1.5.2 or later to convert old LyX files
+Python 2.2 or later
 
 How does the LyX version scheme work?
 


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José On Thursday 21 September 2006 12:00, Jean-Marc Lasgouttes wrote:
  In the misc section at the end. You should document that we
 require 2.2 now (in README and INSTALL).

José   Something like the following attached patch?

Yes.

José   We should also rework the test in configure.ac from # Check
José for installed python AM_PATH_PYTHON(1.5.2,, :)

José to AM_PATH_PYTHON(2.2.0,,)

José   That is it should fail if python 2.2 is not present, since we
José require it in several places...

José   Since we are late in the game I understand if we don't change
José the last part, but we should for further releases.

Yes, let's do it for 1.4.4.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 12:57, Jean-Marc Lasgouttes wrote:
 José   Something like the following attached patch?

 Yes.

  Committed with the corresponding Changelog entry.

 José   We should also rework the test in configure.ac from # Check
 José for installed python AM_PATH_PYTHON(1.5.2,, :)

 José to AM_PATH_PYTHON(2.2.0,,)

 José   That is it should fail if python 2.2 is not present, since we
 José require it in several places...

 José   Since we are late in the game I understand if we don't change
 José the last part, but we should for further releases.

 Yes, let's do it for 1.4.4.

  OK.

 JMarc

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José On Thursday 21 September 2006 12:57, Jean-Marc Lasgouttes wrote:
José   Something like the following attached patch?
  Yes.

José   Committed with the corresponding Changelog entry.

Good boy.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 10:08, Stephan Witt wrote:
 I've just detected another phyton problem.
 The script lib/scripts/TeXFiles.py failed with

 Indexing files of type cls
 Traceback (most recent call last):
File /home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py, line 110,
 in ? for root,path,files in os.walk(dir):
 AttributeError: 'module' object has no attribute 'walk'
 Menu warning: menu entries Einstellungen...|i and TeX Information|I
 share the same shortcut.
 Indexing files of type cls
 Traceback (most recent call last):
File /home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py, line 110,
 in ? for root,path,files in os.walk(dir):
 AttributeError: 'module' object has no attribute 'walk'
 Indexing files of type cls
 Traceback (most recent call last):
File /home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py, line 110,
 in ? for root,path,files in os.walk(dir):
 AttributeError: 'module' object has no attribute 'walk'

  The right fix is to take some code from twisted, 
http://twistedmatrix.com/trac/browser/trunk/twisted/python/compat.py?rev=14178format=txt

And the code is:

try:
os.walk
except AttributeError:
def walk(top, topdown=True, onerror=None):
from os.path import join, isdir, islink

try:
names = os.listdir(top)
except OSError, e:
if onerror is not None:
onerror(err)
return

nondir, dir = [], []
nameLists = [nondir, dir]
for name in names:
nameLists[isdir(join(top, name))].append(name)

if topdown:
yield top, dir, nondir

for name in dir:
path = join(top, name)
if not islink(path):
for x in walk(path, topdown, onerror):
yield x

if not topdown:
yield top, dir, nondir
os.walk = walk

So if os.walk is not defined we define it.
Conversely, the right fix for configure.py is to define the missing functions, 
this implies that the code will be the same everywhere and it is easier to 
maintain.

if sys.version_info[:3] in ((2, 2, 0), (2, 2, 1)):
def lstrip(s, c=string.whitespace):
while s and s[0] in c:
s = s[1:]
return s
def rstrip(s, c=string.whitespace):
while s and s[-1] in c:
s = s[:-1]
return s
def strip(s, c=string.whitespace, l=lstrip, r=rstrip):
return l(r(s, c), c)

object.__setattr__(str, 'lstrip', lstrip)
object.__setattr__(str, 'rstrip', rstrip)
object.__setattr__(str, 'strip', strip)

I am leaving now, I don't have time to commit this. I would need some time to 
guarantee that the code is correct, basically that we import the right 
modules in python 2.2.

The decision is your Jean-Marc.
-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Wednesday 20 September 2006 13:57, Rainer Dorsch wrote:
> José,
>
> did you apply this patch. I compiled 1.4.3svn and still get
>
> Checking whether TeX allows spaces in file names...
> Traceback (most recent call last):
>
> File
> "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py",
> line 730, in ?
> checkTeXAllowSpaces()
>
> File
> "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py",
> line 655, in checkTeXAllowSpaces
> if 'working' in latex_out:
> TypeError: 'in ' requires character as left operand
> LyX: Done!

  The patch I sent has this issue fixed. I send the patch again attached. The 
patch is against the latest svn version.

  Could you try and see if the attached patch works. It is the only way to ask 
Jean-Marc to included it in the stable series.

  This code only applies to 1.4.x since for 1.5.x we require python 2.3 where 
this code runs.

> Apparently the support for QT 3.0.5 patch was applied by Enrico.
>
> Thanks,
> Rainer

-- 
José Abílio
Index: configure.py
===
--- configure.py	(revision 15093)
+++ configure.py	(working copy)
@@ -106,7 +106,7 @@
 os.close(fd)
 inpname = cmdOutput('cygpath -m ' + tmpfname)
 latex_out = cmdOutput(r'latex "\nonstopmode\input{%s}"' % inpname)
-if 'Error' in latex_out:
+if latex_out.find('Error') != -1:
 print "configure: TeX engine needs posix-style paths in latex files"
 windows_style_tex_paths = 'false'
 else:
@@ -579,7 +579,10 @@
 for line in open('chkconfig.vars').readlines():
 key, val = re.sub('-', '_', line).split('=')
 val = val.strip()
-values[key] = val.strip("'")
+tmp = val.split("'")
+while tmp and not tmp[0]: tmp = tmp[1:]
+while tmp and not tmp[-1]: tmp = tmp[:-1]
+values[key] = "'".join(tmp)
 # chk_fontenc may not exist 
 try:
 addToRC(r'\font_encoding "%s"' % values["chk_fontenc"])
@@ -652,7 +655,7 @@
 latex_out = cmdOutput(LATEX + r""" "\nonstopmode\input{\"a b\"}" """)
 else:
 latex_out = cmdOutput(LATEX + r""" '\nonstopmode\input{"a b"}' """)
-if 'working' in latex_out:
+if latex_out.find('working') != -1:
 print 'yes'
 tex_allows_spaces = 'true'
 else:


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
> "José" == José Matos <[EMAIL PROTECTED]> writes:

José>   The patch I sent has this issue fixed. I send the patch again
José> attached. The patch is against the latest svn version.

José>   Could you try and see if the attached patch works. It is the
José> only way to ask Jean-Marc to included it in the stable series.

I'd like this patch to go in 1.4.3. Jose', if you feel confident
that it improves the situation, please apply. We'll apply another one
if problems remain.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Stephan Witt

Jean-Marc Lasgouttes wrote:

"José" == José Matos <[EMAIL PROTECTED]> writes:



José>   The patch I sent has this issue fixed. I send the patch again
José> attached. The patch is against the latest svn version.

José>   Could you try and see if the attached patch works. It is the
José> only way to ask Jean-Marc to included it in the stable series.

I'd like this patch to go in 1.4.3. Jose', if you feel confident
that it improves the situation, please apply. We'll apply another one
if problems remain.


I've successfully tested the patch on my good old SuSE 8.1.
Without the patch I failed to configure.py my user directory
with the exception in checkTeXAllowSpaces(). After applying the
patch it is fine.

Regards,

Stephan

% ../lyx-1.4.x/configure --with-frontend=qt
...
checking for python... /usr/bin/python
checking for python version... 2.2
checking for python platform... linux2
...
Configuration
  Host type:  i686-pc-linux-gnu
  Special build flags:assertions warnings  use-ispell
  C   Compiler:   gcc
  C   Compiler LyX flags:
  C   Compiler flags: -W -Wall   -I/usr/X11R6/include -g -O
  C++ Compiler:   g++ (3.2.3)
  C++ Compiler LyX flags:  -fno-exceptions
  C++ Compiler flags: -W -Wall   -I/usr/X11R6/include -g -O
  Linker flags:
  Linker user flags:
  Qt Frontend:
  Qt version:   3.0.5
  Packaging:  posix
  LyX binary dir: /usr/local/bin
  LyX files dir:  /usr/local/share/lyx

--



Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
> "Stephan" == Stephan Witt <[EMAIL PROTECTED]> writes:

Stephan> Jean-Marc Lasgouttes wrote:
>>> "José" == José Matos <[EMAIL PROTECTED]> writes:
>>
José> The patch I sent has this issue fixed. I send the patch again
José> attached. The patch is against the latest svn version.
>>
José> Could you try and see if the attached patch works. It is the
José> only way to ask Jean-Marc to included it in the stable series.
>>  I'd like this patch to go in 1.4.3. Jose', if you feel confident
>> that it improves the situation, please apply. We'll apply another
>> one if problems remain.

Stephan> I've successfully tested the patch on my good old SuSE 8.1.
Stephan> Without the patch I failed to configure.py my user directory
Stephan> with the exception in checkTeXAllowSpaces(). After applying
Stephan> the patch it is fine.

Thanks. Jose', please apply.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Stephan Witt

Jean-Marc Lasgouttes wrote:

"José" == José Matos <[EMAIL PROTECTED]> writes:



José>   The patch I sent has this issue fixed. I send the patch again
José> attached. The patch is against the latest svn version.

José>   Could you try and see if the attached patch works. It is the
José> only way to ask Jean-Marc to included it in the stable series.

I'd like this patch to go in 1.4.3. Jose', if you feel confident
that it improves the situation, please apply. We'll apply another one
if problems remain.


I've just detected another phyton problem.
The script lib/scripts/TeXFiles.py failed with

Indexing files of type cls
Traceback (most recent call last):
  File "/home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py", line 110, in ?
for root,path,files in os.walk(dir):
AttributeError: 'module' object has no attribute 'walk'
Menu warning: menu entries "Einstellungen...|i" and "TeX Information|I" share 
the same shortcut.

Indexing files of type cls
Traceback (most recent call last):
  File "/home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py", line 110, in ?
for root,path,files in os.walk(dir):
AttributeError: 'module' object has no attribute 'walk'
Indexing files of type cls
Traceback (most recent call last):
  File "/home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py", line 110, in ?
for root,path,files in os.walk(dir):
AttributeError: 'module' object has no attribute 'walk'


Regards,
Stephan

--



Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 10:01, Jean-Marc Lasgouttes wrote:
> Thanks. Jose', please apply.

  I will do it Jean-Marc.

  Suse (I always forget the proper capitalisation) 8.1 was released in October 
2002, the same applies to Redhat 8.0. Both distributions support python 2.2. 
Debian 3.0 release at almost the same time supports 2.1.3. We are then 
supporting 4 years old distribution, a conservative approach.

  Given this, I think that we can raise the bar and require python 2.2 (2.1.3 
if really necessary) for lyx 1.4.x. What do you think?

> JMarc

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Juergen Spitzmueller
José Matos wrote:
> Suse (I always forget the proper capitalisation)

Novell also ;-)

Jürgen


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 10:08, Stephan Witt wrote:
>
> I've just detected another phyton problem.
> The script lib/scripts/TeXFiles.py failed with
>
> AttributeError: 'module' object has no attribute 'walk'
> Indexing files of type cls
> Traceback (most recent call last):
>File "/home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py", line 110,
> in ? for root,path,files in os.walk(dir):
> AttributeError: 'module' object has no attribute 'walk'

  Same problem, this feature appeared in python 2.3
http://docs.python.org/lib/os-file-dir.html

  I will have a look into it.

> Regards,
> Stephan
>
> --

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
> "José" == José Matos <[EMAIL PROTECTED]> writes:

José>   Given this, I think that we can raise the bar and require
José> python 2.2 (2.1.3 if really necessary) for lyx 1.4.x. What do
José> you think?

I can agree with that. I think we should have decided that for 1.4.0,
actually.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 10:01, Jean-Marc Lasgouttes wrote:
> Thanks. Jose', please apply.

  I committed the patch. But I did not change status.14x, where should this 
entry go?

> JMarc

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
> "José" == José Matos <[EMAIL PROTECTED]> writes:

José> On Thursday 21 September 2006 10:01, Jean-Marc Lasgouttes wrote:
>> Thanks. Jose', please apply.

José>   I committed the patch. But I did not change status.14x, where
José> should this entry go?

In the misc section at the end. You should document that we require
2.2 now (in README and INSTALL).

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 12:00, Jean-Marc Lasgouttes wrote:
>
> In the misc section at the end. You should document that we require
> 2.2 now (in README and INSTALL).

  Something like the following attached patch?

  We should also rework the test in configure.ac from
# Check for installed python
AM_PATH_PYTHON(1.5.2,, :)

to
AM_PATH_PYTHON(2.2.0,,)

  That is it should fail if python 2.2 is not present, since we require it in 
several places...

  Since we are late in the game I understand if we don't change the last part, 
but we should for further releases.

> JMarc

-- 
José Abílio
Index: status.14x
===
--- status.14x	(revision 15105)
+++ status.14x	(working copy)
@@ -174,6 +174,8 @@
 
 * Miscellaneous
 
+- LyX requires now python 2.2 to work properly.
+
 - Display LaTeX package checking results faster during configuration.
 
 - Log the output of configure.py to a log file configure.log.
Index: INSTALL
===
--- INSTALL	(revision 15105)
+++ INSTALL	(working copy)
@@ -114,9 +114,7 @@
 as. Otherwise, LyX will not be able to run a number of tests. Note
 that users can run these tests manually with Edit>Reconfigure.
 
-  o Python 1.5.2 or newer installed to be able to import older LyX files
-with the lyx2lyx script (this script is called automatically when
-opening a file).
+  o Python 2.2 or newer installed.
 
 
 Creating the Makefile
Index: README
===
--- README	(revision 15105)
+++ README	(working copy)
@@ -32,7 +32,7 @@
 
 A decent LaTeX2e installation (e.g. teTeX for unix) not older
than 1995/12/01.
-Python 1.5.2 or later to convert old LyX files
+Python 2.2 or later
 
 How does the LyX version scheme work?
 


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
> "José" == José Matos <[EMAIL PROTECTED]> writes:

José> On Thursday 21 September 2006 12:00, Jean-Marc Lasgouttes wrote:
>>  In the misc section at the end. You should document that we
>> require 2.2 now (in README and INSTALL).

José>   Something like the following attached patch?

Yes.

José>   We should also rework the test in configure.ac from # Check
José> for installed python AM_PATH_PYTHON(1.5.2,, :)

José> to AM_PATH_PYTHON(2.2.0,,)

José>   That is it should fail if python 2.2 is not present, since we
José> require it in several places...

José>   Since we are late in the game I understand if we don't change
José> the last part, but we should for further releases.

Yes, let's do it for 1.4.4.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 12:57, Jean-Marc Lasgouttes wrote:
> José>   Something like the following attached patch?
>
> Yes.

  Committed with the corresponding Changelog entry.

> José>   We should also rework the test in configure.ac from # Check
> José> for installed python AM_PATH_PYTHON(1.5.2,, :)
>
> José> to AM_PATH_PYTHON(2.2.0,,)
>
> José>   That is it should fail if python 2.2 is not present, since we
> José> require it in several places...
>
> José>   Since we are late in the game I understand if we don't change
> José> the last part, but we should for further releases.
>
> Yes, let's do it for 1.4.4.

  OK.

> JMarc

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread Jean-Marc Lasgouttes
> "José" == José Matos <[EMAIL PROTECTED]> writes:

José> On Thursday 21 September 2006 12:57, Jean-Marc Lasgouttes wrote:
José>   Something like the following attached patch?
>>  Yes.

José>   Committed with the corresponding Changelog entry.

Good boy.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-21 Thread José Matos
On Thursday 21 September 2006 10:08, Stephan Witt wrote:
> I've just detected another phyton problem.
> The script lib/scripts/TeXFiles.py failed with
>
> Indexing files of type cls
> Traceback (most recent call last):
>File "/home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py", line 110,
> in ? for root,path,files in os.walk(dir):
> AttributeError: 'module' object has no attribute 'walk'
> Menu warning: menu entries "Einstellungen...|i" and "TeX Information|I"
> share the same shortcut.
> Indexing files of type cls
> Traceback (most recent call last):
>File "/home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py", line 110,
> in ? for root,path,files in os.walk(dir):
> AttributeError: 'module' object has no attribute 'walk'
> Indexing files of type cls
> Traceback (most recent call last):
>File "/home/witt/src/lyx/lyx-1.4.x/lib/scripts/TeXFiles.py", line 110,
> in ? for root,path,files in os.walk(dir):
> AttributeError: 'module' object has no attribute 'walk'

  The right fix is to take some code from twisted, 
http://twistedmatrix.com/trac/browser/trunk/twisted/python/compat.py?rev=14178=txt

And the code is:

try:
os.walk
except AttributeError:
def walk(top, topdown=True, onerror=None):
from os.path import join, isdir, islink

try:
names = os.listdir(top)
except OSError, e:
if onerror is not None:
onerror(err)
return

nondir, dir = [], []
nameLists = [nondir, dir]
for name in names:
nameLists[isdir(join(top, name))].append(name)

if topdown:
yield top, dir, nondir

for name in dir:
path = join(top, name)
if not islink(path):
for x in walk(path, topdown, onerror):
yield x

if not topdown:
yield top, dir, nondir
os.walk = walk

So if os.walk is not defined we define it.
Conversely, the right fix for configure.py is to define the missing functions, 
this implies that the code will be the same everywhere and it is easier to 
maintain.

if sys.version_info[:3] in ((2, 2, 0), (2, 2, 1)):
def lstrip(s, c=string.whitespace):
while s and s[0] in c:
s = s[1:]
return s
def rstrip(s, c=string.whitespace):
while s and s[-1] in c:
s = s[:-1]
return s
def strip(s, c=string.whitespace, l=lstrip, r=rstrip):
return l(r(s, c), c)

object.__setattr__(str, 'lstrip', lstrip)
object.__setattr__(str, 'rstrip', rstrip)
object.__setattr__(str, 'strip', strip)

I am leaving now, I don't have time to commit this. I would need some time to 
guarantee that the code is correct, basically that we import the right 
modules in python 2.2.

The decision is your Jean-Marc.
-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-20 Thread Rainer Dorsch
José,

did you apply this patch. I compiled 1.4.3svn and still get

Checking whether TeX allows spaces in file names...
Traceback (most recent call last):
  
File /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py, 
line 730, in ?
checkTeXAllowSpaces()
  
File /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py, 
line 655, in checkTeXAllowSpaces
if 'working' in latex_out:
TypeError: 'in string' requires character as left operand
LyX: Done!


Apparently the support for QT 3.0.5 patch was applied by Enrico.


Thanks,
Rainer

Am Freitag, 15. September 2006 12:44 schrieb José Matos:
 On Friday 15 September 2006 10:36, Rainer Dorsch wrote:
   José,
 
  thanks for the patch.
 
  I could not apply the patch using the patch command, you apparently
  generated it for a different version of configure.py.

   I have used the version that will become lyx-1.4.3

  I applied it manually and it worked, configure runs now thorugh.
 
  How do I know when your two patches are applied to the 1.4.x tree, such
  that I could check before the release of 1.4.3 if it is compatible with
  QT 3.0.x and Python 2.2.1?

   I am CC'ing this message to Jean-Marc the release coordinator of the
 stable version.

   With the proposed patch for configure.py lyx requires a python version
 between 2.0 and 2.2.1.

   May I apply the patch to lyx-1.4.3?

   Enrico asked in another message of this thread to commit another patch to
 work with qt 3.0.

  Thanks,
  Rainer

-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-20 Thread Rainer Dorsch
José,

did you apply this patch. I compiled 1.4.3svn and still get

Checking whether TeX allows spaces in file names...
Traceback (most recent call last):
  
File "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py", 
line 730, in ?
checkTeXAllowSpaces()
  
File "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py", 
line 655, in checkTeXAllowSpaces
if 'working' in latex_out:
TypeError: 'in ' requires character as left operand
LyX: Done!


Apparently the support for QT 3.0.5 patch was applied by Enrico.


Thanks,
Rainer

Am Freitag, 15. September 2006 12:44 schrieb José Matos:
> On Friday 15 September 2006 10:36, Rainer Dorsch wrote:
> >  José,
> >
> > thanks for the patch.
> >
> > I could not apply the patch using the patch command, you apparently
> > generated it for a different version of configure.py.
>
>   I have used the version that will become lyx-1.4.3
>
> > I applied it manually and it worked, configure runs now thorugh.
> >
> > How do I know when your two patches are applied to the 1.4.x tree, such
> > that I could check before the release of 1.4.3 if it is compatible with
> > QT 3.0.x and Python 2.2.1?
>
>   I am CC'ing this message to Jean-Marc the release coordinator of the
> stable version.
>
>   With the proposed patch for configure.py lyx requires a python version
> between 2.0 and 2.2.1.
>
>   May I apply the patch to lyx-1.4.3?
>
>   Enrico asked in another message of this thread to commit another patch to
> work with qt 3.0.
>
> > Thanks,
> > Rainer

-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-16 Thread José Matos
On Friday 15 September 2006 21:52, Jean-Marc Lasgouttes wrote:
 Yes.

  Do you think that it is worth to revert to 1.5.2 support?

  I can do it if you want to. :-)

 JMarc

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-16 Thread José Matos
On Friday 15 September 2006 21:52, Jean-Marc Lasgouttes wrote:
> Yes.

  Do you think that it is worth to revert to 1.5.2 support?

  I can do it if you want to. :-)

> JMarc

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Rainer Dorsch
 José,

thanks for the patch. 

I could not apply the patch using the patch command, you apparently generated 
it for a different version of configure.py.

I applied it manually and it worked, configure runs now thorugh.

How do I know when your two patches are applied to the 1.4.x tree, such that I 
could check before the release of 1.4.3 if it is compatible with QT 3.0.x and 
Python 2.2.1?

Thanks,
Rainer 

Am Freitag, 15. September 2006 00:15 schrieb José Matos:
 On Thursday 14 September 2006 21:59, Rainer Dorsch wrote:
  Any ideas here?

   Yes, this method was implemented in python 2.2.2 and you 2.2.1. :-D

   I attach a patch that fixes yesterday problem and another similar as
 well. Please apply to the original file.

  Thanks,
  Rainer

-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread José Matos
On Friday 15 September 2006 10:36, Rainer Dorsch wrote:
  José,

 thanks for the patch.

 I could not apply the patch using the patch command, you apparently
 generated it for a different version of configure.py.

  I have used the version that will become lyx-1.4.3

 I applied it manually and it worked, configure runs now thorugh.

 How do I know when your two patches are applied to the 1.4.x tree, such
 that I could check before the release of 1.4.3 if it is compatible with QT
 3.0.x and Python 2.2.1?

  I am CC'ing this message to Jean-Marc the release coordinator of the stable 
version.

  With the proposed patch for configure.py lyx requires a python version 
between 2.0 and 2.2.1.

  May I apply the patch to lyx-1.4.3?

  Enrico asked in another message of this thread to commit another patch to 
work with qt 3.0.

 Thanks,
 Rainer

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José   I am CC'ing this message to Jean-Marc the release coordinator
José of the stable version.

José   With the proposed patch for configure.py lyx requires a python
José version between 2.0 and 2.2.1.

José   May I apply the patch to lyx-1.4.3?

Hmm, I see in README that we say python 1.5. If it is 2.x, we should
say so. The patches I have seen discussed are definitely OK anyway.

José   Enrico asked in another message of this thread to commit
José another patch to work with qt 3.0.

Yes, I saw it.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Jean-Marc Lasgouttes
 Enrico == Enrico Forestieri [EMAIL PROTECTED] writes:

Enrico according to Rainer Dorsch the attached patch let LyX compile
Enrico again with qt3.0. Please let me know if I can apply it to
Enrico 1.4.x.

The change in toqstr should be conditionned on qt version too. Using
fromLatin1 defeats the purpose of using
QTextCodec::setCodecForCStrings, as I read it from the documentation.

With these things fixed, the patch is OK.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Enrico Forestieri
On Fri, Sep 15, 2006 at 02:06:09PM +0200, Jean-Marc Lasgouttes wrote:
  Enrico == Enrico Forestieri [EMAIL PROTECTED] writes:
 
 Enrico according to Rainer Dorsch the attached patch let LyX compile
 Enrico again with qt3.0. Please let me know if I can apply it to
 Enrico 1.4.x.
 
 The change in toqstr should be conditionned on qt version too. Using
 fromLatin1 defeats the purpose of using
 QTextCodec::setCodecForCStrings, as I read it from the documentation.

You're right. I should have checked that, too.

 With these things fixed, the patch is OK.

I have committed the attached patch.

-- 
Enrico
Index: src/frontends/qt2/qt_helpers.C
===
--- src/frontends/qt2/qt_helpers.C  (revision 15010)
+++ src/frontends/qt2/qt_helpers.C  (working copy)
@@ -116,7 +116,11 @@ void lengthToWidgets(QLineEdit * input, 
 
 QString const toqstr(char const * str)
 {
+#if QT_VERSION = 0x030100
return QString::fromAscii(str);
+#else
+   return QString::fromLatin1(str);
+#endif
 }
 
 
Index: src/frontends/qt2/ChangeLog
===
--- src/frontends/qt2/ChangeLog (revision 15010)
+++ src/frontends/qt2/ChangeLog (working copy)
@@ -1,3 +1,10 @@
+2006-09-15  Enrico Forestieri  [EMAIL PROTECTED]
+
+   * qt_helpers.C (toqstr): use fromAscii only with Qt 3.1 and higher.
+
+   * QLyXKeySym.C (initEncodings): use setCodecForCStrings only with
+   Qt 3.1 and higher.
+
 2006-08-19  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
 
* QContentPane.C (focusInEvent, focusOutEvent): new methods;
Index: src/frontends/qt2/QLyXKeySym.C
===
--- src/frontends/qt2/QLyXKeySym.C  (revision 15010)
+++ src/frontends/qt2/QLyXKeySym.C  (working copy)
@@ -130,7 +130,9 @@ void initEncodings()
QTextCodec * defaultCodec = encoding_map[s];
encoding_map[] = defaultCodec;
 
+#if QT_VERSION = 0x030100
QTextCodec::setCodecForCStrings(defaultCodec);
+#endif
 
 }
 


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread José Matos
On Friday 15 September 2006 13:02, Jean-Marc Lasgouttes wrote:
 Hmm, I see in README that we say python 1.5. If it is 2.x, we should
 say so. The patches I have seen discussed are definitely OK anyway.

  Is configure.py used for all users?

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José On Friday 15 September 2006 13:02, Jean-Marc Lasgouttes wrote:
 Hmm, I see in README that we say python 1.5. If it is 2.x, we
 should say so. The patches I have seen discussed are definitely OK
 anyway.

José   Is configure.py used for all users?

Yes.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Rainer Dorsch
 José,

thanks for the patch. 

I could not apply the patch using the patch command, you apparently generated 
it for a different version of configure.py.

I applied it manually and it worked, configure runs now thorugh.

How do I know when your two patches are applied to the 1.4.x tree, such that I 
could check before the release of 1.4.3 if it is compatible with QT 3.0.x and 
Python 2.2.1?

Thanks,
Rainer 

Am Freitag, 15. September 2006 00:15 schrieb José Matos:
> On Thursday 14 September 2006 21:59, Rainer Dorsch wrote:
> > Any ideas here?
>
>   Yes, this method was implemented in python 2.2.2 and you 2.2.1. :-D
>
>   I attach a patch that fixes yesterday problem and another similar as
> well. Please apply to the original file.
>
> > Thanks,
> > Rainer

-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread José Matos
On Friday 15 September 2006 10:36, Rainer Dorsch wrote:
>  José,
>
> thanks for the patch.
>
> I could not apply the patch using the patch command, you apparently
> generated it for a different version of configure.py.

  I have used the version that will become lyx-1.4.3

> I applied it manually and it worked, configure runs now thorugh.
>
> How do I know when your two patches are applied to the 1.4.x tree, such
> that I could check before the release of 1.4.3 if it is compatible with QT
> 3.0.x and Python 2.2.1?

  I am CC'ing this message to Jean-Marc the release coordinator of the stable 
version.

  With the proposed patch for configure.py lyx requires a python version 
between 2.0 and 2.2.1.

  May I apply the patch to lyx-1.4.3?

  Enrico asked in another message of this thread to commit another patch to 
work with qt 3.0.

> Thanks,
> Rainer

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Jean-Marc Lasgouttes
> "José" == José Matos <[EMAIL PROTECTED]> writes:

José>   I am CC'ing this message to Jean-Marc the release coordinator
José> of the stable version.

José>   With the proposed patch for configure.py lyx requires a python
José> version between 2.0 and 2.2.1.

José>   May I apply the patch to lyx-1.4.3?

Hmm, I see in README that we say python 1.5. If it is 2.x, we should
say so. The patches I have seen discussed are definitely OK anyway.

José>   Enrico asked in another message of this thread to commit
José> another patch to work with qt 3.0.

Yes, I saw it.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes:

Enrico> according to Rainer Dorsch the attached patch let LyX compile
Enrico> again with qt3.0. Please let me know if I can apply it to
Enrico> 1.4.x.

The change in toqstr should be conditionned on qt version too. Using
fromLatin1 defeats the purpose of using
QTextCodec::setCodecForCStrings, as I read it from the documentation.

With these things fixed, the patch is OK.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Enrico Forestieri
On Fri, Sep 15, 2006 at 02:06:09PM +0200, Jean-Marc Lasgouttes wrote:
> > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes:
> 
> Enrico> according to Rainer Dorsch the attached patch let LyX compile
> Enrico> again with qt3.0. Please let me know if I can apply it to
> Enrico> 1.4.x.
> 
> The change in toqstr should be conditionned on qt version too. Using
> fromLatin1 defeats the purpose of using
> QTextCodec::setCodecForCStrings, as I read it from the documentation.

You're right. I should have checked that, too.

> With these things fixed, the patch is OK.

I have committed the attached patch.

-- 
Enrico
Index: src/frontends/qt2/qt_helpers.C
===
--- src/frontends/qt2/qt_helpers.C  (revision 15010)
+++ src/frontends/qt2/qt_helpers.C  (working copy)
@@ -116,7 +116,11 @@ void lengthToWidgets(QLineEdit * input, 
 
 QString const toqstr(char const * str)
 {
+#if QT_VERSION >= 0x030100
return QString::fromAscii(str);
+#else
+   return QString::fromLatin1(str);
+#endif
 }
 
 
Index: src/frontends/qt2/ChangeLog
===
--- src/frontends/qt2/ChangeLog (revision 15010)
+++ src/frontends/qt2/ChangeLog (working copy)
@@ -1,3 +1,10 @@
+2006-09-15  Enrico Forestieri  <[EMAIL PROTECTED]>
+
+   * qt_helpers.C (toqstr): use fromAscii only with Qt 3.1 and higher.
+
+   * QLyXKeySym.C (initEncodings): use setCodecForCStrings only with
+   Qt 3.1 and higher.
+
 2006-08-19  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
* QContentPane.C (focusInEvent, focusOutEvent): new methods;
Index: src/frontends/qt2/QLyXKeySym.C
===
--- src/frontends/qt2/QLyXKeySym.C  (revision 15010)
+++ src/frontends/qt2/QLyXKeySym.C  (working copy)
@@ -130,7 +130,9 @@ void initEncodings()
QTextCodec * defaultCodec = encoding_map[s];
encoding_map[""] = defaultCodec;
 
+#if QT_VERSION >= 0x030100
QTextCodec::setCodecForCStrings(defaultCodec);
+#endif
 
 }
 


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread José Matos
On Friday 15 September 2006 13:02, Jean-Marc Lasgouttes wrote:
> Hmm, I see in README that we say python 1.5. If it is 2.x, we should
> say so. The patches I have seen discussed are definitely OK anyway.

  Is configure.py used for all users?

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-15 Thread Jean-Marc Lasgouttes
> "José" == José Matos <[EMAIL PROTECTED]> writes:

José> On Friday 15 September 2006 13:02, Jean-Marc Lasgouttes wrote:
>> Hmm, I see in README that we say python 1.5. If it is 2.x, we
>> should say so. The patches I have seen discussed are definitely OK
>> anyway.

José>   Is configure.py used for all users?

Yes.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-14 Thread Enrico Forestieri
On Wed, Sep 13, 2006 at 12:42:01PM +0200, Jean-Marc Lasgouttes wrote:
  Rainer == Rainer Dorsch [EMAIL PROTECTED] writes:
 
 Rainer So that means lyx 1.4.2 does not support qt 3.0.x, right?
 
 Rainer If yes, someone should update the README for 1.4.3. It says
 Rainer that even QT2 might be supported though untested. This would
 Rainer mean at least qt=3.1 is required.
 
 I think we should support qt3.0 if possible. Concerning qt2, there is
 indeed no reason to support it.

Jean-Marc,

according to Rainer Dorsch the attached patch let LyX compile again
with qt3.0. Please let me know if I can apply it to 1.4.x.

Then there's an issue with the required minimum version of python
but I think that Josè can handle it.

-- 
Enrico
Index: src/frontends/qt2/qt_helpers.C
===
--- src/frontends/qt2/qt_helpers.C  (revision 14992)
+++ src/frontends/qt2/qt_helpers.C  (working copy)
@@ -116,7 +116,7 @@ void lengthToWidgets(QLineEdit * input, 
 
 QString const toqstr(char const * str)
 {
-   return QString::fromAscii(str);
+   return QString::fromLatin1(str);
 }
 
 
Index: src/frontends/qt2/ChangeLog
===
--- src/frontends/qt2/ChangeLog (revision 14992)
+++ src/frontends/qt2/ChangeLog (working copy)
@@ -1,3 +1,11 @@
+2006-09-14  Enrico Forestieri  [EMAIL PROTECTED]
+
+   * qt_helpers.C (toqstr): Qt 3.0 doesn't have fromAscii, so replace
+   it with fromLatin1.
+
+   * QLyXKeySym.C (initEncodings): use setCodecForCStrings only with
+   Qt 3.1 and higher.
+
 2006-08-19  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
 
* QContentPane.C (focusInEvent, focusOutEvent): new methods;
Index: src/frontends/qt2/QLyXKeySym.C
===
--- src/frontends/qt2/QLyXKeySym.C  (revision 14992)
+++ src/frontends/qt2/QLyXKeySym.C  (working copy)
@@ -130,7 +130,9 @@ void initEncodings()
QTextCodec * defaultCodec = encoding_map[s];
encoding_map[] = defaultCodec;
 
+#if QT_VERSION = 0x030100
QTextCodec::setCodecForCStrings(defaultCodec);
+#endif
 
 }
 


Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Lars Gullik Bjønnes
Enrico Forestieri [EMAIL PROTECTED] writes:

| Then there's an issue with the required minimum version of python
| but I think that Josè can handle it.

It is not unlikely that we have to up the requirement a bit more for
1.5. Lyx2lyx conversion of the latexaccent really wants to use the
unicodedata module and its normalize function, that was new in 2.3.

-- 
Lgb



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Georg Baum
Lars Gullik Bjønnes wrote:

 Enrico Forestieri [EMAIL PROTECTED] writes:
 
 | Then there's an issue with the required minimum version of python
 | but I think that Josè can handle it.

That issue was an invalid .lyx file as it turned out.

 It is not unlikely that we have to up the requirement a bit more for
 1.5. Lyx2lyx conversion of the latexaccent really wants to use the
 unicodedata module and its normalize function, that was new in 2.3.

We did that already. 2.3 is required for 1.5.


Georg



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 09:17, Lars Gullik Bjønnes wrote:
 It is not unlikely that we have to up the requirement a bit more for
 1.5. Lyx2lyx conversion of the latexaccent really wants to use the
 unicodedata module and its normalize function, that was new in 2.3.

  We have discussed that issue in the list. We (Georg and me) agreed with 2.3 
as the minimum requirement for 1.5 so you are safe there. :-)

  Also from configure.ac:
# Check for installed python
AM_PATH_PYTHON(2.3,, :)

  I think that python should a requirement, not only optional as it is now.

  OTHO I could demand python 2.5 (to be released in a week) to be our minimum 
requirement, after all when lyx 1.5 is released all modern linux 
distributions will carry it. ;-)

  FWIW, RHEL 5 and FC6 are in this class. :-p

 --
 Lgb

-- 
José Abílio


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Enrico Forestieri
On Thu, Sep 14, 2006 at 10:27:02AM +0200, Georg Baum wrote:
 Lars Gullik Bjønnes wrote:
 
  Enrico Forestieri [EMAIL PROTECTED] writes:
  
  | Then there's an issue with the required minimum version of python
  | but I think that Josè can handle it.
 
 That issue was an invalid .lyx file as it turned out.

Uhm, maybe yes maybe not:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg100737.html

-- 
Enrico


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Lars Gullik Bjønnes
José Matos [EMAIL PROTECTED] writes:

| On Thursday 14 September 2006 09:17, Lars Gullik Bjønnes wrote:
|  It is not unlikely that we have to up the requirement a bit more for
|  1.5. Lyx2lyx conversion of the latexaccent really wants to use the
|  unicodedata module and its normalize function, that was new in 2.3.
| 
|   We have discussed that issue in the list. We (Georg and me) agreed with 2.3 
| as the minimum requirement for 1.5 so you are safe there. :-)

Good. I saw you mention 2.2 here the other day and assumed (I know...)
that to be the requirement.

One pity with python of corse is that is is 16-bit unicode only.


-- 
Lgb



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 09:54, Lars Gullik Bjønnes wrote:
 Good. I saw you mention 2.2 here the other day and assumed (I know...)
 that to be the requirement.

  Use the source Luke. (I always wanted to say that. ;-) )

 One pity with python of corse is that is is 16-bit unicode only.

  It is not as simple, really. :-)

  You and me are using UCS-4 and not UCS-2.
You can see that in 
http://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf#search=%22python%20unicode%2016-bits%22

  You can see there that for 2.2+ UCS-4 is a configuration option.

  AFAIR in Fedora and other linux distributions we are using UCS-4.
http://www.python.org/download/linux/

 --
 Lgb

PS: Jean-Marc as you can see in the first link, unicode supports composition , 
what you would expect from unicodeaccent. :-)
-- 
José Abílio


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Lars Gullik Bjønnes
José Matos [EMAIL PROTECTED] writes:

| On Thursday 14 September 2006 09:54, Lars Gullik Bjønnes wrote:
|  Good. I saw you mention 2.2 here the other day and assumed (I know...)
|  that to be the requirement.
| 
|   Use the source Luke. (I always wanted to say that. ;-) )
| 
|  One pity with python of corse is that is is 16-bit unicode only.
| 
|   It is not as simple, really. :-)
| 
|   You and me are using UCS-4 and not UCS-2.
| You can see that in 
| 
http://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf#search=%22python%20unicode%2016-bits%22
| 
|   You can see there that for 2.2+ UCS-4 is a configuration option.
| 
|   AFAIR in Fedora and other linux distributions we are using UCS-4.
| http://www.python.org/download/linux/

Yeah. But python module unicode data is using Unicode-3.2. The latest
Unicode standard is now at 5.0.

But it is better than expected then.

-- 
Lgb



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 11:08, Lars Gullik Bjønnes wrote:
 Yeah. But python module unicode data is using Unicode-3.2. The latest
 Unicode standard is now at 5.0.

  Come on Lars, that is unfair. ;-)

  python 2.5 that will come in a week or so supports Unicode 4.1.
http://docs.python.org/dev/lib/module-unicodedata.html

  You should not expect for python to support unreleased unicode specs at the 
time it is released. :-)

  I expect python 2.6 to support unicode 5.

 But it is better than expected then.

  :-)

 --
 Lgb

-- 
José Abílio


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Lars Gullik Bjønnes
José Matos [EMAIL PROTECTED] writes:

| On Thursday 14 September 2006 11:08, Lars Gullik Bjønnes wrote:
|  Yeah. But python module unicode data is using Unicode-3.2. The latest
|  Unicode standard is now at 5.0.
| 
|   Come on Lars, that is unfair. ;-)
| 
|   python 2.5 that will come in a week or so supports Unicode 4.1.
| http://docs.python.org/dev/lib/module-unicodedata.html

Hmm da hmm... I don't follow python development.

|   You should not expect for python to support unreleased unicode specs at the 
| time it is released. :-)

in a week. 5.0 is already released (for some month now. AFAIK)

-- 
Lgb



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 11:28, Lars Gullik Bjønnes wrote:
 |   You should not expect for python to support unreleased unicode specs at
 | the time it is released. :-)

 in a week. 5.0 is already released (for some month now. AFAIK)

 Aha, python 2.5 was frozen in June/July, as release manager you are certainly 
aware of the dangers of depending on a external entity while your code base 
is frozen. Touché. ;-)

 --
 Lgb

-- 
José Abílio


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 09:54, Lars Gullik Bjønnes wrote:
 One pity with python of corse is that is is 16-bit unicode only.

  OK. Just to be sure one test is:

$ python -c import sys; print (sys.maxunicode  66000) and 'UCS2' or 'UCS4'

  As expected I get
UCS4

 --
 Lgb

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-14 Thread Rainer Dorsch
José,

that brings me further:

+checking for graphics driver... default
+checking for package psnfss [times.sty]... yes
+Inspection done.
+Read the file doc/LaTeXConfig.lyx for more information.
Traceback (most recent call last):
  File /opt/lyx-1.4.2/share/lyx/configure.py, line 710, in ?
checkLatexConfig( lyx_check_config and LATEX != '', bool_docbook, 
bool_linuxdoc)
  File /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py, 
line 562, in checkLatexConfig
values[key] = val.strip(')
TypeError: strip() takes no arguments (1 given)
LyX: Done!

Any ideas here?

Thanks,
Rainer


Am Mittwoch, 13. September 2006 21:39 schrieb José Matos:
 On Wednesday 13 September 2006 20:19, Rainer Dorsch wrote:
  [EMAIL PROTECTED]:~ python -V
  Python 2.2.1
  [EMAIL PROTECTED]:~
 
  Does not look bad (?)

   Nope it is fine. :-)

 I found the reference to this in http://docs.python.org/lib/typesseq.html

 (1)
 When s is a string or Unicode string object the in and not in operations
 act like a substring test. In Python versions before 2.3, x had to be a
 string of length 1. In Python 2.3 and beyond, x may be a string of any
 length.

   Could you replace the faulty line, line 635, in checkTeXAllowSpaces

 if 'working' in latex_out:

 with
 if latex_out.find('working') != -1:

 beware that indentations is significant in python, i.e., keep the same
 number of spaces in the left part of the expression.

  Thanks,
  Rainer

-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-14 Thread José Matos
On Thursday 14 September 2006 21:59, Rainer Dorsch wrote:
 Any ideas here?

  Yes, this method was implemented in python 2.2.2 and you 2.2.1. :-D

  I attach a patch that fixes yesterday problem and another similar as well. 
Please apply to the original file.

 Thanks,
 Rainer

-- 
José Abílio
Index: configure.py
===
--- configure.py	(revision 14998)
+++ configure.py	(working copy)
@@ -106,7 +106,7 @@
 os.close(fd)
 inpname = cmdOutput('cygpath -m ' + tmpfname)
 latex_out = cmdOutput(r'latex \nonstopmode\input{%s}' % inpname)
-if 'Error' in latex_out:
+if latex_out.find('Error') != -1:
 print configure: TeX engine needs posix-style paths in latex files
 windows_style_tex_paths = 'false'
 else:
@@ -579,7 +579,10 @@
 for line in open('chkconfig.vars').readlines():
 key, val = re.sub('-', '_', line).split('=')
 val = val.strip()
-values[key] = val.strip(')
+tmp = val.split(')
+while tmp and not tmp[0]: tmp = tmp[1:]
+while tmp and not tmp[-1]: tmp = tmp[:-1]
+values[key] = '.join(tmp)
 # chk_fontenc may not exist 
 try:
 addToRC(r'\font_encoding %s' % values[chk_fontenc])
@@ -652,7 +655,7 @@
 latex_out = cmdOutput(LATEX + r \nonstopmode\input{\a b\} )
 else:
 latex_out = cmdOutput(LATEX + r '\nonstopmode\input{a b}' )
-if 'working' in latex_out:
+if latex_out.find('working') != -1:
 print 'yes'
 tex_allows_spaces = 'true'
 else:


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-14 Thread Enrico Forestieri
On Wed, Sep 13, 2006 at 12:42:01PM +0200, Jean-Marc Lasgouttes wrote:
> > "Rainer" == Rainer Dorsch <[EMAIL PROTECTED]> writes:
> 
> Rainer> So that means lyx 1.4.2 does not support qt 3.0.x, right?
> 
> Rainer> If yes, someone should update the README for 1.4.3. It says
> Rainer> that even QT2 might be supported though untested. This would
> Rainer> mean at least qt>=3.1 is required.
> 
> I think we should support qt3.0 if possible. Concerning qt2, there is
> indeed no reason to support it.

Jean-Marc,

according to Rainer Dorsch the attached patch let LyX compile again
with qt3.0. Please let me know if I can apply it to 1.4.x.

Then there's an issue with the required minimum version of python
but I think that Josè can handle it.

-- 
Enrico
Index: src/frontends/qt2/qt_helpers.C
===
--- src/frontends/qt2/qt_helpers.C  (revision 14992)
+++ src/frontends/qt2/qt_helpers.C  (working copy)
@@ -116,7 +116,7 @@ void lengthToWidgets(QLineEdit * input, 
 
 QString const toqstr(char const * str)
 {
-   return QString::fromAscii(str);
+   return QString::fromLatin1(str);
 }
 
 
Index: src/frontends/qt2/ChangeLog
===
--- src/frontends/qt2/ChangeLog (revision 14992)
+++ src/frontends/qt2/ChangeLog (working copy)
@@ -1,3 +1,11 @@
+2006-09-14  Enrico Forestieri  <[EMAIL PROTECTED]>
+
+   * qt_helpers.C (toqstr): Qt 3.0 doesn't have fromAscii, so replace
+   it with fromLatin1.
+
+   * QLyXKeySym.C (initEncodings): use setCodecForCStrings only with
+   Qt 3.1 and higher.
+
 2006-08-19  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
* QContentPane.C (focusInEvent, focusOutEvent): new methods;
Index: src/frontends/qt2/QLyXKeySym.C
===
--- src/frontends/qt2/QLyXKeySym.C  (revision 14992)
+++ src/frontends/qt2/QLyXKeySym.C  (working copy)
@@ -130,7 +130,9 @@ void initEncodings()
QTextCodec * defaultCodec = encoding_map[s];
encoding_map[""] = defaultCodec;
 
+#if QT_VERSION >= 0x030100
QTextCodec::setCodecForCStrings(defaultCodec);
+#endif
 
 }
 


Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Lars Gullik Bjønnes
Enrico Forestieri <[EMAIL PROTECTED]> writes:

| Then there's an issue with the required minimum version of python
| but I think that Josè can handle it.

It is not unlikely that we have to up the requirement a bit more for
1.5. Lyx2lyx conversion of the latexaccent really wants to use the
unicodedata module and its normalize function, that was new in 2.3.

-- 
Lgb



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Georg Baum
Lars Gullik Bjønnes wrote:

> Enrico Forestieri <[EMAIL PROTECTED]> writes:
> 
> | Then there's an issue with the required minimum version of python
> | but I think that Josè can handle it.

That issue was an invalid .lyx file as it turned out.

> It is not unlikely that we have to up the requirement a bit more for
> 1.5. Lyx2lyx conversion of the latexaccent really wants to use the
> unicodedata module and its normalize function, that was new in 2.3.

We did that already. 2.3 is required for 1.5.


Georg



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 09:17, Lars Gullik Bjønnes wrote:
> It is not unlikely that we have to up the requirement a bit more for
> 1.5. Lyx2lyx conversion of the latexaccent really wants to use the
> unicodedata module and its normalize function, that was new in 2.3.

  We have discussed that issue in the list. We (Georg and me) agreed with 2.3 
as the minimum requirement for 1.5 so you are safe there. :-)

  Also from configure.ac:
# Check for installed python
AM_PATH_PYTHON(2.3,, :)

  I think that python should a requirement, not only optional as it is now.

  OTHO I could demand python 2.5 (to be released in a week) to be our minimum 
requirement, after all when lyx 1.5 is released all modern linux 
distributions will carry it. ;-)

  FWIW, RHEL 5 and FC6 are in this class. :-p

> --
> Lgb

-- 
José Abílio


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Enrico Forestieri
On Thu, Sep 14, 2006 at 10:27:02AM +0200, Georg Baum wrote:
> Lars Gullik Bjønnes wrote:
> 
> > Enrico Forestieri <[EMAIL PROTECTED]> writes:
> > 
> > | Then there's an issue with the required minimum version of python
> > | but I think that Josè can handle it.
> 
> That issue was an invalid .lyx file as it turned out.

Uhm, maybe yes maybe not:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg100737.html

-- 
Enrico


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Lars Gullik Bjønnes
José Matos <[EMAIL PROTECTED]> writes:

| On Thursday 14 September 2006 09:17, Lars Gullik Bjønnes wrote:
| > It is not unlikely that we have to up the requirement a bit more for
| > 1.5. Lyx2lyx conversion of the latexaccent really wants to use the
| > unicodedata module and its normalize function, that was new in 2.3.
| 
|   We have discussed that issue in the list. We (Georg and me) agreed with 2.3 
| as the minimum requirement for 1.5 so you are safe there. :-)

Good. I saw you mention 2.2 here the other day and assumed (I know...)
that to be the requirement.

One pity with python of corse is that is is 16-bit unicode only.


-- 
Lgb



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 09:54, Lars Gullik Bjønnes wrote:
> Good. I saw you mention 2.2 here the other day and assumed (I know...)
> that to be the requirement.

  Use the source Luke. (I always wanted to say that. ;-) )

> One pity with python of corse is that is is 16-bit unicode only.

  It is not as simple, really. :-)

  You and me are using UCS-4 and not UCS-2.
You can see that in 
http://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf#search=%22python%20unicode%2016-bits%22

  You can see there that for 2.2+ UCS-4 is a configuration option.

  AFAIR in Fedora and other linux distributions we are using UCS-4.
http://www.python.org/download/linux/

> --
> Lgb

PS: Jean-Marc as you can see in the first link, unicode supports composition , 
what you would expect from unicodeaccent. :-)
-- 
José Abílio


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Lars Gullik Bjønnes
José Matos <[EMAIL PROTECTED]> writes:

| On Thursday 14 September 2006 09:54, Lars Gullik Bjønnes wrote:
| > Good. I saw you mention 2.2 here the other day and assumed (I know...)
| > that to be the requirement.
| 
|   Use the source Luke. (I always wanted to say that. ;-) )
| 
| > One pity with python of corse is that is is 16-bit unicode only.
| 
|   It is not as simple, really. :-)
| 
|   You and me are using UCS-4 and not UCS-2.
| You can see that in 
| 
http://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf#search=%22python%20unicode%2016-bits%22
| 
|   You can see there that for 2.2+ UCS-4 is a configuration option.
| 
|   AFAIR in Fedora and other linux distributions we are using UCS-4.
| http://www.python.org/download/linux/

Yeah. But python module unicode data is using Unicode-3.2. The latest
Unicode standard is now at 5.0.

But it is better than expected then.

-- 
Lgb



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 11:08, Lars Gullik Bjønnes wrote:
> Yeah. But python module unicode data is using Unicode-3.2. The latest
> Unicode standard is now at 5.0.

  Come on Lars, that is unfair. ;-)

  python 2.5 that will come in a week or so supports Unicode 4.1.
http://docs.python.org/dev/lib/module-unicodedata.html

  You should not expect for python to support unreleased unicode specs at the 
time it is released. :-)

  I expect python 2.6 to support unicode 5.

> But it is better than expected then.

  :-)

> --
> Lgb

-- 
José Abílio


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread Lars Gullik Bjønnes
José Matos <[EMAIL PROTECTED]> writes:

| On Thursday 14 September 2006 11:08, Lars Gullik Bjønnes wrote:
| > Yeah. But python module unicode data is using Unicode-3.2. The latest
| > Unicode standard is now at 5.0.
| 
|   Come on Lars, that is unfair. ;-)
| 
|   python 2.5 that will come in a week or so supports Unicode 4.1.
| http://docs.python.org/dev/lib/module-unicodedata.html

Hmm da hmm... I don't follow python development.

|   You should not expect for python to support unreleased unicode specs at the 
| time it is released. :-)

"in a week". 5.0 is already released (for some month now. AFAIK)

-- 
Lgb



Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 11:28, Lars Gullik Bjønnes wrote:
> |   You should not expect for python to support unreleased unicode specs at
> | the time it is released. :-)
>
> "in a week". 5.0 is already released (for some month now. AFAIK)

 Aha, python 2.5 was frozen in June/July, as release manager you are certainly 
aware of the dangers of depending on a external entity while your code base 
is frozen. Touché. ;-)

> --
> Lgb

-- 
José Abílio


Re: Pythn version requirement (was: Compile issue of 1.4.2 with QT 3.0.5)

2006-09-14 Thread José Matos
On Thursday 14 September 2006 09:54, Lars Gullik Bjønnes wrote:
> One pity with python of corse is that is is 16-bit unicode only.

  OK. Just to be sure one test is:

$ python -c "import sys; print (sys.maxunicode < 66000) and 'UCS2' or 'UCS4'"

  As expected I get
UCS4

> --
> Lgb

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-14 Thread Rainer Dorsch
José,

that brings me further:

+checking for graphics driver... default
+checking for package psnfss [times.sty]... yes
+Inspection done.
+Read the file doc/LaTeXConfig.lyx for more information.
Traceback (most recent call last):
  File "/opt/lyx-1.4.2/share/lyx/configure.py", line 710, in ?
checkLatexConfig( lyx_check_config and LATEX != '', bool_docbook, 
bool_linuxdoc)
  File "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py", 
line 562, in checkLatexConfig
values[key] = val.strip("'")
TypeError: strip() takes no arguments (1 given)
LyX: Done!

Any ideas here?

Thanks,
Rainer


Am Mittwoch, 13. September 2006 21:39 schrieb José Matos:
> On Wednesday 13 September 2006 20:19, Rainer Dorsch wrote:
> > [EMAIL PROTECTED]:~> python -V
> > Python 2.2.1
> > [EMAIL PROTECTED]:~>
> >
> > Does not look bad (?)
>
>   Nope it is fine. :-)
>
> I found the reference to this in http://docs.python.org/lib/typesseq.html
>
> (1)
> When s is a string or Unicode string object the in and not in operations
> act like a substring test. In Python versions before 2.3, x had to be a
> string of length 1. In Python 2.3 and beyond, x may be a string of any
> length.
>
>   Could you replace the faulty line, line 635, in checkTeXAllowSpaces
>
> if 'working' in latex_out:
>
> with
> if latex_out.find('working') != -1:
>
> beware that indentations is significant in python, i.e., keep the same
> number of spaces in the left part of the expression.
>
> > Thanks,
> > Rainer

-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-14 Thread José Matos
On Thursday 14 September 2006 21:59, Rainer Dorsch wrote:
> Any ideas here?

  Yes, this method was implemented in python 2.2.2 and you 2.2.1. :-D

  I attach a patch that fixes yesterday problem and another similar as well. 
Please apply to the original file.

> Thanks,
> Rainer

-- 
José Abílio
Index: configure.py
===
--- configure.py	(revision 14998)
+++ configure.py	(working copy)
@@ -106,7 +106,7 @@
 os.close(fd)
 inpname = cmdOutput('cygpath -m ' + tmpfname)
 latex_out = cmdOutput(r'latex "\nonstopmode\input{%s}"' % inpname)
-if 'Error' in latex_out:
+if latex_out.find('Error') != -1:
 print "configure: TeX engine needs posix-style paths in latex files"
 windows_style_tex_paths = 'false'
 else:
@@ -579,7 +579,10 @@
 for line in open('chkconfig.vars').readlines():
 key, val = re.sub('-', '_', line).split('=')
 val = val.strip()
-values[key] = val.strip("'")
+tmp = val.split("'")
+while tmp and not tmp[0]: tmp = tmp[1:]
+while tmp and not tmp[-1]: tmp = tmp[:-1]
+values[key] = "'".join(tmp)
 # chk_fontenc may not exist 
 try:
 addToRC(r'\font_encoding "%s"' % values["chk_fontenc"])
@@ -652,7 +655,7 @@
 latex_out = cmdOutput(LATEX + r""" "\nonstopmode\input{\"a b\"}" """)
 else:
 latex_out = cmdOutput(LATEX + r""" '\nonstopmode\input{"a b"}' """)
-if 'working' in latex_out:
+if latex_out.find('working') != -1:
 print 'yes'
 tex_allows_spaces = 'true'
 else:


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread Jean-Marc Lasgouttes
 Rainer == Rainer Dorsch [EMAIL PROTECTED] writes:

Rainer So that means lyx 1.4.2 does not support qt 3.0.x, right?

Rainer If yes, someone should update the README for 1.4.3. It says
Rainer that even QT2 might be supported though untested. This would
Rainer mean at least qt=3.1 is required.

I think we should support qt3.0 if possible. Concerning qt2, there is
indeed no reason to support it.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread Rainer Dorsch
Am Mittwoch, 13. September 2006 12:42 schrieb Jean-Marc Lasgouttes:
  Rainer == Rainer Dorsch [EMAIL PROTECTED] writes:

 Rainer So that means lyx 1.4.2 does not support qt 3.0.x, right?

 Rainer If yes, someone should update the README for 1.4.3. It says
 Rainer that even QT2 might be supported though untested. This would
 Rainer mean at least qt=3.1 is required.

 I think we should support qt3.0 if possible. Concerning qt2, there is
 indeed no reason to support it.


The changes proposed by Enrico made lyx 1.4.2 compile with QT 3.0.5:


remove the setCodecsForCStrings() from
src/frontends/qt2/QLyXKeySym.C:
#if 0
QTextCodec::setCodecForCStrings(defaultCodec);
#endif

src/frontends/qt2/qt_helpers.C:
- replace fromAscii with fromLatin1


LyX comes up after that, but I get an error reported:

 Checking whether TeX allows spaces in file names...
Traceback (most recent call last):
  File /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py, 
line 705, in ?
checkTeXAllowSpaces()
  File /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py, 
line 635, in checkTeXAllowSpaces
if 'working' in latex_out:
TypeError: 'in string' requires character as left operand
LyX: Done!
mclin:s1 /afs/bb/u/rdorsch #

Any help is welcome here...

Thanks,
Rainer


-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread Enrico Forestieri
On Wed, Sep 13, 2006 at 04:07:12PM +0200, Rainer Dorsch wrote:

 LyX comes up after that, but I get an error reported:
 
  Checking whether TeX allows spaces in file names...
 Traceback (most recent call last):
   File /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py, 
 line 705, in ?
 checkTeXAllowSpaces()
   File /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py, 
 line 635, in checkTeXAllowSpaces
 if 'working' in latex_out:
 TypeError: 'in string' requires character as left operand
 LyX: Done!
 mclin:s1 /afs/bb/u/rdorsch #
 
 Any help is welcome here...

Maybe your python is too old?

-- 
Enrico


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread José Matos
On Wednesday 13 September 2006 15:07, Rainer Dorsch wrote:
 LyX comes up after that, but I get an error reported:

  Checking whether TeX allows spaces in file names...
 Traceback (most recent call last):
   File
 /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py, line
 705, in ?
 checkTeXAllowSpaces()
   File
 /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py, line
 635, in checkTeXAllowSpaces
 if 'working' in latex_out:
 TypeError: 'in string' requires character as left operand
 LyX: Done!
 mclin:s1 /afs/bb/u/rdorsch #

  Enrico is right, it seems your python is old, but we promise support for 
1.5.2, so if necessary I will fix it.

  What does 
$ python -V

says?

 Any help is welcome here...

 Thanks,
 Rainer

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread Rainer Dorsch
Am Mittwoch, 13. September 2006 19:57 schrieb José Matos:
 On Wednesday 13 September 2006 15:07, Rainer Dorsch wrote:
  LyX comes up after that, but I get an error reported:
 
   Checking whether TeX allows spaces in file names...
  Traceback (most recent call last):
File
  /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py,
  line 705, in ?
  checkTeXAllowSpaces()
File
  /afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py,
  line 635, in checkTeXAllowSpaces
  if 'working' in latex_out:
  TypeError: 'in string' requires character as left operand
  LyX: Done!
  mclin:s1 /afs/bb/u/rdorsch #

   Enrico is right, it seems your python is old, but we promise support for
 1.5.2, so if necessary I will fix it.

   What does
 $ python -V

 says?


[EMAIL PROTECTED]:~ python -V
Python 2.2.1
[EMAIL PROTECTED]:~

Does not look bad (?)

Thanks,
Rainer


-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread José Matos
On Wednesday 13 September 2006 20:19, Rainer Dorsch wrote:
 [EMAIL PROTECTED]:~ python -V
 Python 2.2.1
 [EMAIL PROTECTED]:~

 Does not look bad (?)

  Nope it is fine. :-)

I found the reference to this in http://docs.python.org/lib/typesseq.html

(1)
When s is a string or Unicode string object the in and not in operations act 
like a substring test. In Python versions before 2.3, x had to be a string of 
length 1. In Python 2.3 and beyond, x may be a string of any length.

  Could you replace the faulty line, line 635, in checkTeXAllowSpaces

if 'working' in latex_out:

with
if latex_out.find('working') != -1:

beware that indentations is significant in python, i.e., keep the same number 
of spaces in the left part of the expression.

 Thanks,
 Rainer

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread Jean-Marc Lasgouttes
> "Rainer" == Rainer Dorsch <[EMAIL PROTECTED]> writes:

Rainer> So that means lyx 1.4.2 does not support qt 3.0.x, right?

Rainer> If yes, someone should update the README for 1.4.3. It says
Rainer> that even QT2 might be supported though untested. This would
Rainer> mean at least qt>=3.1 is required.

I think we should support qt3.0 if possible. Concerning qt2, there is
indeed no reason to support it.

JMarc


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread Rainer Dorsch
Am Mittwoch, 13. September 2006 12:42 schrieb Jean-Marc Lasgouttes:
> > "Rainer" == Rainer Dorsch <[EMAIL PROTECTED]> writes:
>
> Rainer> So that means lyx 1.4.2 does not support qt 3.0.x, right?
>
> Rainer> If yes, someone should update the README for 1.4.3. It says
> Rainer> that even QT2 might be supported though untested. This would
> Rainer> mean at least qt>=3.1 is required.
>
> I think we should support qt3.0 if possible. Concerning qt2, there is
> indeed no reason to support it.
>

The changes proposed by Enrico made lyx 1.4.2 compile with QT 3.0.5:


remove the setCodecsForCStrings() from
src/frontends/qt2/QLyXKeySym.C:
#if 0
QTextCodec::setCodecForCStrings(defaultCodec);
#endif

src/frontends/qt2/qt_helpers.C:
-> replace fromAscii with fromLatin1


LyX comes up after that, but I get an error reported:

 Checking whether TeX allows spaces in file names...
Traceback (most recent call last):
  File "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py", 
line 705, in ?
checkTeXAllowSpaces()
  File "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py", 
line 635, in checkTeXAllowSpaces
if 'working' in latex_out:
TypeError: 'in ' requires character as left operand
LyX: Done!
mclin:s1 /afs/bb/u/rdorsch #

Any help is welcome here...

Thanks,
Rainer


-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread Enrico Forestieri
On Wed, Sep 13, 2006 at 04:07:12PM +0200, Rainer Dorsch wrote:

> LyX comes up after that, but I get an error reported:
> 
>  Checking whether TeX allows spaces in file names...
> Traceback (most recent call last):
>   File "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py", 
> line 705, in ?
> checkTeXAllowSpaces()
>   File "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py", 
> line 635, in checkTeXAllowSpaces
> if 'working' in latex_out:
> TypeError: 'in ' requires character as left operand
> LyX: Done!
> mclin:s1 /afs/bb/u/rdorsch #
> 
> Any help is welcome here...

Maybe your python is too old?

-- 
Enrico


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread José Matos
On Wednesday 13 September 2006 15:07, Rainer Dorsch wrote:
> LyX comes up after that, but I get an error reported:
>
>  Checking whether TeX allows spaces in file names...
> Traceback (most recent call last):
>   File
> "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py", line
> 705, in ?
> checkTeXAllowSpaces()
>   File
> "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py", line
> 635, in checkTeXAllowSpaces
> if 'working' in latex_out:
> TypeError: 'in ' requires character as left operand
> LyX: Done!
> mclin:s1 /afs/bb/u/rdorsch #

  Enrico is right, it seems your python is old, but we promise support for 
1.5.2, so if necessary I will fix it.

  What does 
$ python -V

says?

> Any help is welcome here...
>
> Thanks,
> Rainer

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread Rainer Dorsch
Am Mittwoch, 13. September 2006 19:57 schrieb José Matos:
> On Wednesday 13 September 2006 15:07, Rainer Dorsch wrote:
> > LyX comes up after that, but I get an error reported:
> >
> >  Checking whether TeX allows spaces in file names...
> > Traceback (most recent call last):
> >   File
> > "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py",
> > line 705, in ?
> > checkTeXAllowSpaces()
> >   File
> > "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.2/share/lyx/configure.py",
> > line 635, in checkTeXAllowSpaces
> > if 'working' in latex_out:
> > TypeError: 'in ' requires character as left operand
> > LyX: Done!
> > mclin:s1 /afs/bb/u/rdorsch #
>
>   Enrico is right, it seems your python is old, but we promise support for
> 1.5.2, so if necessary I will fix it.
>
>   What does
> $ python -V
>
> says?


[EMAIL PROTECTED]:~> python -V
Python 2.2.1
[EMAIL PROTECTED]:~>

Does not look bad (?)

Thanks,
Rainer


-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
jabber: [EMAIL PROTECTED]
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F  8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-13 Thread José Matos
On Wednesday 13 September 2006 20:19, Rainer Dorsch wrote:
> [EMAIL PROTECTED]:~> python -V
> Python 2.2.1
> [EMAIL PROTECTED]:~>
>
> Does not look bad (?)

  Nope it is fine. :-)

I found the reference to this in http://docs.python.org/lib/typesseq.html

(1)
When s is a string or Unicode string object the in and not in operations act 
like a substring test. In Python versions before 2.3, x had to be a string of 
length 1. In Python 2.3 and beyond, x may be a string of any length.

  Could you replace the faulty line, line 635, in checkTeXAllowSpaces

if 'working' in latex_out:

with
if latex_out.find('working') != -1:

beware that indentations is significant in python, i.e., keep the same number 
of spaces in the left part of the expression.

> Thanks,
> Rainer

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-12 Thread Rainer Dorsch
Am Montag, 11. September 2006 23:23 schrieb Enrico Forestieri:
 On Mon, Sep 11, 2006 at 08:00:21PM +0200, Rainer Dorsch wrote:
  Hello,
 
  I tried to compile lyx 1.4.2 with QT 3.0.5 using
 
  $ ./configure --prefix /opt/lyx-1.4.2 --with-frontend=qt
  --with-qt-dir=/usr/lib/qt-3.0.5
 
  $ make
 
  and got
 
 
   g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE
  -DQT_GENUINE_STR -DQT_NO_STL -DQT_THREAD_SUPPORT -I../../../src
  -I../../../src/frontends -I../../../images -I/usr/lib/qt-3.0.5//include
  -I../../../boost -I../../../src/frontends/controllers
  -I/usr/X11R6/include -fno-exceptions -O2 -MT QLyXKeySym.lo -MD -MP -MF
  .deps/QLyXKeySym.Tpo -c QLyXKeySym.C -o QLyXKeySym.o
  QLyXKeySym.C: In function `void initEncodings()':
  QLyXKeySym.C:133: no method `QTextCodec::setCodecForCStrings'
  make[7]: *** [QLyXKeySym.lo] Error 1
 
  Any idea what could went wrong is welcome.

 I think that method was introduced in 3.1.

 http://doc.trolltech.com/3.0/qtextcodec-members.html
 http://doc.trolltech.com/3.1/qtextcodec-members.html

So that means lyx 1.4.2 does not support qt 3.0.x, right?

If yes, someone should update the README for 1.4.3. It says that even QT2 
might be supported though untested. This would mean at least qt=3.1 is 
required.

Thanks,
Rainer

-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
ICq 32550367


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-12 Thread José Matos
On Tuesday 12 September 2006 11:35, Rainer Dorsch wrote:
 So that means lyx 1.4.2 does not support qt 3.0.x, right?

  I think so.

  The question now is if this is the only place where this happens or if there 
are others.

  If you run with make -k where are there other places in code where you get 
errors?

 If yes, someone should update the README for 1.4.3. It says that even QT2
 might be supported though untested. This would mean at least qt=3.1 is
 required.

  That was true, but after some time the developers run out of qt3  3.1 to 
test. ;-)

  So if you can support qt 3.0 with very few effort we should do it. :-)

going to src/frontends/qt2 I get
$ grep -i version *[Ch]
lyx_gui.C:#if QT_VERSION = 0x030100
lyx_gui.C:#if QT_VERSION = 0x030200
lyx_gui.C:#if QT_VERSION = 0x030100
panelstack.C:#if QT_VERSION = 300
QAbout.C:   
dialog_-versionLA-setText(toqstr(controller().getVersion()));
QContentPane.h:#if (defined(Q_WS_X11)  QT_VERSION = 0x030200)
qfont_loader.C: lyxerr[Debug::FONT]  raw version!  endl;
qfont_loader.C:// Starting with version 3.1.0, Qt/X11 does its own caching of
qfont_loader.h:#if QT_VERSION  0x030100 || defined(Q_WS_MACX)
qfont_metrics.C:// Other versions return: (x, -y, width, height)
qfont_metrics.C:#if defined(Q_WS_WIN)  (QT_VERSION == 0x030201)
qfont_metrics.C:// Other versions return: (x, -y, width, height)
qfont_metrics.C:#if defined(Q_WS_WIN)  (QT_VERSION == 0x030201)
qgridview.C:** GNU General Public License version 2 as published by the Free 
Software
qgridview.h:** GNU General Public License version 2 as published by the Free 
Software
QLyXKeySym.h:   /// Return a human-readable version of a key+modifier pair.
qt_helpers.C:#if QT_VERSION  = 300
qt_helpers.C:#if QT_VERSION  = 300
QWorkArea.C:#if QT_VERSION = 300
QWorkArea.C:#if QT_VERSION = 300
QWorkArea.C:#if QT_VERSION = 300

 Thanks,
 Rainer

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-12 Thread José Matos
On Tuesday 12 September 2006 11:51, José Matos wrote:
   So if you can support qt 3.0 with very few effort we should do it. :-)

  Sorry I meant *we* not *you*.

  My point is that there are several places in code where we test for qt  3.1 
and for some reason that chunk avoided that check.

  If the fix is just a matter of adding another conditional code at that 
point, and the changes required are small then we should fix. Else it is 
easier to change the documentation as you suggested.

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-12 Thread Rainer Dorsch
José,

I found another issue when running make -k:

 
g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE 
-DQT_GENUINE_STR -DQT_NO_STL -DQT_THREAD_SUPPORT -I../../../src -I../../../s\
rc/frontends -I../../../images -I/usr/lib/qt-3.0.5//include -I../../../boost 
-I../../../src/frontends/controllers -I/usr/X11R6/include -fno-e\
xceptions -O2 -MT qt_helpers.lo -MD -MP -MF .deps/qt_helpers.Tpo -c 
qt_helpers.C -o qt_helpers.o
qt_helpers.C: In function `const QString toqstr(const char*)':
qt_helpers.C:119: no method `QString::fromAscii'
make[7]: *** [qt_helpers.lo] Error 1

Please double check

http://www.alzental-castle.de/~rd/lyx.compile.log

I started a rerun of the compile which broke, therefore there is nothing to do 
for the first targets.

Thanks,
Rainre 

Am Dienstag, 12. September 2006 12:58 schrieb José Matos:
 On Tuesday 12 September 2006 11:51, José Matos wrote:
    So if you can support qt 3.0 with very few effort we should do it. :-)

   Sorry I meant *we* not *you*.

   My point is that there are several places in code where we test for qt 
 3.1 and for some reason that chunk avoided that check.

   If the fix is just a matter of adding another conditional code at that
 point, and the changes required are small then we should fix. Else it is
 easier to change the documentation as you suggested.

-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
ICq 32550367


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-12 Thread Enrico Forestieri
On Tue, Sep 12, 2006 at 02:12:01PM +0200, Rainer Dorsch wrote:

 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE 
 -DQT_GENUINE_STR -DQT_NO_STL -DQT_THREAD_SUPPORT -I../../../src -I../../../s\
 rc/frontends -I../../../images -I/usr/lib/qt-3.0.5//include -I../../../boost 
 -I../../../src/frontends/controllers -I/usr/X11R6/include -fno-e\
 xceptions -O2 -MT qt_helpers.lo -MD -MP -MF .deps/qt_helpers.Tpo -c 
 qt_helpers.C -o qt_helpers.o
 qt_helpers.C: In function `const QString toqstr(const char*)':
 qt_helpers.C:119: no method `QString::fromAscii'
 make[7]: *** [qt_helpers.lo] Error 1

I think that you can safely replace fromAscii with fromLatin1.
Also, try to #ifdef out the line containing setCodecForCStrings
in src/frontends/qt2/QLyXKeySym.C as follows:

#if 0
QTextCodec::setCodecForCStrings(defaultCodec);
#endif

and see what happens.

-- 
Enrico


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-12 Thread Rainer Dorsch
Am Montag, 11. September 2006 23:23 schrieb Enrico Forestieri:
> On Mon, Sep 11, 2006 at 08:00:21PM +0200, Rainer Dorsch wrote:
> > Hello,
> >
> > I tried to compile lyx 1.4.2 with QT 3.0.5 using
> >
> > $ ./configure --prefix /opt/lyx-1.4.2 --with-frontend=qt
> > --with-qt-dir=/usr/lib/qt-3.0.5
> >
> > $ make
> >
> > and got
> >
> >
> >  g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE
> > -DQT_GENUINE_STR -DQT_NO_STL -DQT_THREAD_SUPPORT -I../../../src
> > -I../../../src/frontends -I../../../images -I/usr/lib/qt-3.0.5//include
> > -I../../../boost -I../../../src/frontends/controllers
> > -I/usr/X11R6/include -fno-exceptions -O2 -MT QLyXKeySym.lo -MD -MP -MF
> > .deps/QLyXKeySym.Tpo -c QLyXKeySym.C -o QLyXKeySym.o
> > QLyXKeySym.C: In function `void initEncodings()':
> > QLyXKeySym.C:133: no method `QTextCodec::setCodecForCStrings'
> > make[7]: *** [QLyXKeySym.lo] Error 1
> >
> > Any idea what could went wrong is welcome.
>
> I think that method was introduced in 3.1.
>
> http://doc.trolltech.com/3.0/qtextcodec-members.html
> http://doc.trolltech.com/3.1/qtextcodec-members.html

So that means lyx 1.4.2 does not support qt 3.0.x, right?

If yes, someone should update the README for 1.4.3. It says that even QT2 
might be supported though untested. This would mean at least qt>=3.1 is 
required.

Thanks,
Rainer

-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
ICq 32550367


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-12 Thread José Matos
On Tuesday 12 September 2006 11:35, Rainer Dorsch wrote:
> So that means lyx 1.4.2 does not support qt 3.0.x, right?

  I think so.

  The question now is if this is the only place where this happens or if there 
are others.

  If you run with make -k where are there other places in code where you get 
errors?

> If yes, someone should update the README for 1.4.3. It says that even QT2
> might be supported though untested. This would mean at least qt>=3.1 is
> required.

  That was true, but after some time the developers run out of qt3 < 3.1 to 
test. ;-)

  So if you can support qt 3.0 with very few effort we should do it. :-)

going to src/frontends/qt2 I get
$ grep -i version *[Ch]
lyx_gui.C:#if QT_VERSION >= 0x030100
lyx_gui.C:#if QT_VERSION >= 0x030200
lyx_gui.C:#if QT_VERSION >= 0x030100
panelstack.C:#if QT_VERSION >= 300
QAbout.C:   
dialog_->versionLA->setText(toqstr(controller().getVersion()));
QContentPane.h:#if (defined(Q_WS_X11) && QT_VERSION >= 0x030200)
qfont_loader.C: lyxerr[Debug::FONT] << "raw version!" << endl;
qfont_loader.C:// Starting with version 3.1.0, Qt/X11 does its own caching of
qfont_loader.h:#if QT_VERSION < 0x030100 || defined(Q_WS_MACX)
qfont_metrics.C:// Other versions return: (x, -y, width, height)
qfont_metrics.C:#if defined(Q_WS_WIN) && (QT_VERSION == 0x030201)
qfont_metrics.C:// Other versions return: (x, -y, width, height)
qfont_metrics.C:#if defined(Q_WS_WIN) && (QT_VERSION == 0x030201)
qgridview.C:** GNU General Public License version 2 as published by the Free 
Software
qgridview.h:** GNU General Public License version 2 as published by the Free 
Software
QLyXKeySym.h:   /// Return a human-readable version of a key+modifier pair.
qt_helpers.C:#if QT_VERSION  >= 300
qt_helpers.C:#if QT_VERSION  >= 300
QWorkArea.C:#if QT_VERSION >= 300
QWorkArea.C:#if QT_VERSION >= 300
QWorkArea.C:#if QT_VERSION >= 300

> Thanks,
> Rainer

-- 
José Abílio


Re: Compile issue of 1.4.2 with QT 3.0.5

2006-09-12 Thread José Matos
On Tuesday 12 September 2006 11:51, José Matos wrote:
>   So if you can support qt 3.0 with very few effort we should do it. :-)

  Sorry I meant *we* not *you*.

  My point is that there are several places in code where we test for qt < 3.1 
and for some reason that chunk avoided that check.

  If the fix is just a matter of adding another conditional code at that 
point, and the changes required are small then we should fix. Else it is 
easier to change the documentation as you suggested.

-- 
José Abílio


  1   2   >