python26 - looking for porters (issue 92413)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

python26 - looking for porters (issue 92413)

Joerg Budischewski
Hi,

the cws python26 (based on DEV300_m41) shall upgrade the python engine
from 2.3.4->2.6.1.

In its current state, it builds on linux-x86+win32-xp(with VC++ 9.0
Express Edition).

I would welcome any porter to support the effort for the other platforms.

Up to now, Eric Bachard aleady agreed to take care for the macos-x port.

Find below a small description, what needs to be done.

Bye,

Joerg
-----------

what needs to be done:
* checkout python26 cws
* configure ( PYTHONHOME env variable is removed from set_soenv.in)
* in case you reuse a dev300_m41 original build, ensure, that all python
stuff is erased from solver (python.exe, inc/python, lib/python, etc.)
otherwise you will get strange errors
* build the cws. You will probably get problems during building the
python module. Solve them.
* after that, build the rest (you may get additional problems in the
pyuno module, solve them)
* QA-1:
build the testtools module and switch to
testtools/source/bridgetest/pyuno and run

dmake runtest

* QA-2:
install the office, start python from the program directory and type

import uno

* QA-3:
Start the office, choose Tools/Macros/Run macro ..., click on
"OpenOffice.org Macros", you should then have a pythonSamples Library at
the bottom of the list.

That's it. In case you have any problems you can't solve, let us know
either on this list or within the above issue. Attach patches to the
above issue.





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: python26 - looking for porters (issue 92413)

Maho NAKATA-2
Hello Joerg,
PLZ wait for one week (3/28) I'll test the cws for FBSD.

From: Joerg Budischewski <[hidden email]>
Subject: [porting-dev] python26 - looking for porters (issue 92413)
Date: Wed, 18 Mar 2009 21:45:56 +0100

> Hi,
>
> the cws python26 (based on DEV300_m41) shall upgrade the python engine
> from 2.3.4->2.6.1.
>
> In its current state, it builds on linux-x86+win32-xp(with VC++ 9.0
> Express Edition).
>
> I would welcome any porter to support the effort for the other
> platforms.
>
> Up to now, Eric Bachard aleady agreed to take care for the macos-x
> port.
>
> Find below a small description, what needs to be done.
>
> Bye,
>
> Joerg
> -----------
>
> what needs to be done:
> * checkout python26 cws
> * configure ( PYTHONHOME env variable is removed from set_soenv.in)
> * in case you reuse a dev300_m41 original build, ensure, that all python
> * stuff is erased from solver (python.exe, inc/python, lib/python, etc.)
> * otherwise you will get strange errors
> * build the cws. You will probably get problems during building the
> * python module. Solve them.
> * after that, build the rest (you may get additional problems in the
> * pyuno module, solve them)
> * QA-1:
> build the testtools module and switch to
> testtools/source/bridgetest/pyuno and run
>
> dmake runtest
>
> * QA-2:
> install the office, start python from the program directory and type
>
> import uno
>
> * QA-3:
> Start the office, choose Tools/Macros/Run macro ..., click on
> "OpenOffice.org Macros", you should then have a pythonSamples Library
> at the bottom of the list.
>
> That's it. In case you have any problems you can't solve, let us know
> either on this list or within the above issue. Attach patches to the
> above issue.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
>

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: python26 - looking for porters (issue 92413)

Maho NAKATA-2
In reply to this post by Joerg Budischewski
Hi Joerg Budischewski,

I created an issue 100492 and set as dependency to 92413.

From: Joerg Budischewski <[hidden email]>
Subject: [porting-dev] python26 - looking for porters (issue 92413)
Date: Wed, 18 Mar 2009 21:45:56 +0100

> I would welcome any porter to support the effort for the other
> platforms.

I ported to FreeBSD7 i386.

> what needs to be done:
> * checkout python26 cws
done
> * configure ( PYTHONHOME env variable is removed from set_soenv.in)
yes, it was removed.
> * in case you reuse a dev300_m41 original build, ensure, that all python
> * stuff is erased from solver (python.exe, inc/python, lib/python, etc.)
i did a clean build.
> * otherwise you will get strange errors
> * build the cws. You will probably get problems during building the
done.
> * python module. Solve them.
done. patch-python26
> * after that, build the rest (you may get additional problems in the
> * pyuno module, solve them)
done.
> * QA-1:
> build the testtools module and switch to
> testtools/source/bridgetest/pyuno and run
>
> dmake runtest
here is my reslut on FBSD7. I think it's correct. I'm happy if you have a look.

dmake runtest
start test with  dmake runtest
-------------
cd ../../../unxfbsdi.pro/lib && setenv FOO file:///work/python26/openoffice.org-3-devel/work/python26/testtools/source/bridgetest/pyuno/../../../unxfbsdi.pro/lib && setenv UNO_TYPES pyuno_regcomp.rdb && setenv UNO_SERVICES pyuno_regcomp.rdb && python main.py
testStandard (importer.ImporterTestCase) ... ok
testDynamicComponentRegistration (importer.ImporterTestCase) ... ok
testErrors (core.TestCase) ... ok
testBaseTypes (core.TestCase) ... ok
testOutparam (core.TestCase) ... ok
testStruct (core.TestCase) ... ok
testType (core.TestCase) ... ok
testEnum (core.TestCase) ... ok
testBool (core.TestCase) ... ok
testChar (core.TestCase) ... ok
testUnicode (core.TestCase) ... ok
testConstant (core.TestCase) ... ok
testExceptions (core.TestCase) ... ok
testInterface (core.TestCase) ... ok
testByteSequence (core.TestCase) ... ok
testInvoke (core.TestCase) ... ok
testStandard (impl.TestCase) ... ok
testUrlHelper (impl.TestHelperCase) ... ok
testInspect (impl.TestHelperCase) ... ok
testListener (impl.TestHelperCase) ... ok
testCurrentContext (impl.TestHelperCase) ... ok

----------------------------------------------------------------------
Ran 21 tests in 0.084s

OK
cd ../../../unxfbsdi.pro/lib && setenv FOO file:///work/python26/openoffice.org-3-devel/work/python26/testtools/source/bridgetest/pyuno/../../../unxfbsdi.pro/lib && setenv UNO_TYPES pyuno_regcomp.rdb && setenv UNO_SERVICES pyuno_regcomp.rdb &&  regcomp -register -br pyuno_regcomp.rdb -r dummy.rdb \
                        -l com.sun.star.loader.Python -c vnd.openoffice.pymodule:samplecomponent
vnd.openoffice.pymodule:samplecomponent
register component 'vnd.openoffice.pymodule:samplecomponent' in registry 'dummy.rdb' succesful!
cd ../../../unxfbsdi.pro/lib && setenv FOO file:///work/python26/openoffice.org-3-devel/work/python26/testtools/source/bridgetest/pyuno/../../../unxfbsdi.pro/lib && setenv UNO_TYPES pyuno_regcomp.rdb && setenv UNO_SERVICES pyuno_regcomp.rdb &&  regcomp -register -br pyuno_regcomp.rdb -r dummy2.rdb \
                        -l com.sun.star.loader.Python -c vnd.sun.star.expand:\$FOO/samplecomponent.py
vnd.sun.star.expand:$FOO/samplecomponent.py
register component 'vnd.sun.star.expand:$FOO/samplecomponent.py' in registry 'dummy2.rdb' succesful!

> * QA-2:
> install the office, start python from the program directory and type
>
> import uno

again, my result on FBSD7. I think it's correct. I'm happy if you have
a look.
% ./openoffice.org3/program/python
Python 2.6.1 (r261:67515, Mar 23 2009, 21:39:00)
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd7
Type "help", "copyright", "credits" or "license" for more information.
>>> import uno
>>>

> * QA-3:
> Start the office, choose Tools/Macros/Run macro ..., click on
> "OpenOffice.org Macros", you should then have a pythonSamples Library
> at the bottom of the list.
I found it, so it's okay.

Best,
-- Nakata Maho http://accc.riken.jp/maho/ , http://ja.openoffice.org/
   Nakata Maho's PGP public keys: http://accc.riken.jp/maho/maho.pgp.txt

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: python26 - looking for porters (issue 92413)

Takashi Ono
In reply to this post by Joerg Budischewski
Hello Joerg,

I am doing mingw port. Currently mingw port is still experimental and actually python
module is not well tested. I want to make it really work.

I am facing a couple of problems.

1. Compilation of scripts
All the installed scripts are compiled when "make install" is invoked. However, some
compilation fails as they include unicode escape '\\N'. The compiler tries to load
unicodedata extension module but it is not yet installed.

There is a workaround to add sharedinstall to the dependency rule of libinstall and
append the directory to PYTHONPATH at the line invoing compileall.py, but I do not know
why it does not occur on other platforms and am not sure it is a good fix. Do they know
the location of the unicodedata dynamic loading module in temp directory?

2. Stripping of symbols in python.exe
The symbols in binary files created in mingw build should be stripped when making
install set. It is handled by a perl script solenv/bin/modules/installer/strip.pm. Most
part of the code is copied from the one for unix platforms. It copies the file to a
working directory, strip the symbols and save the name of the stripped file to use
instead of the original source afterwards.
The problem is that the script uses only one directory for one language. The files not
language specific use the same directory. The wrapper pyuno/python.exe for windows is
overwritten by the python.exe in python-core during the stripping process.

The current workaround is to handle pyuno/python,exe as an exceptional case and use a
unique directory. I do not think it is an elegant solution. Maybe it is better to
rename the core binary to have a unique name. I have not tried yet.

3. QA-3 is failing
That is it. I would like to have suggestions where should I investigate.

Best Regards,

In message "[porting-dev] python26 - looking for porters (issue 92413)",
Joerg Budischewski wrote...
 >Hi,
 >
 >the cws python26 (based on DEV300_m41) shall upgrade the python engine
 >from 2.3.4->2.6.1.
 >
 >In its current state, it builds on linux-x86+win32-xp(with VC++ 9.0
 >Express Edition).
 >
 >I would welcome any porter to support the effort for the other platforms.
 >
 >Up to now, Eric Bachard aleady agreed to take care for the macos-x port.
 >
 >Find below a small description, what needs to be done.
 >
 >Bye,
 >
 >Joerg
 >-----------
 >
 >what needs to be done:
 >* checkout python26 cws
 >* configure ( PYTHONHOME env variable is removed from set_soenv.in)
 >* in case you reuse a dev300_m41 original build, ensure, that all python
 >stuff is erased from solver (python.exe, inc/python, lib/python, etc.)
 >otherwise you will get strange errors
 >* build the cws. You will probably get problems during building the
 >python module. Solve them.
 >* after that, build the rest (you may get additional problems in the
 >pyuno module, solve them)
 >* QA-1:
 >build the testtools module and switch to
 >testtools/source/bridgetest/pyuno and run
 >
 >dmake runtest
 >
 >* QA-2:
 >install the office, start python from the program directory and type
 >
 >import uno
 >
 >* QA-3:
 >Start the office, choose Tools/Macros/Run macro ..., click on
 >"OpenOffice.org Macros", you should then have a pythonSamples Library at
 >the bottom of the list.
 >
 >That's it. In case you have any problems you can't solve, let us know
 >either on this list or within the above issue. Attach patches to the
 >above issue.
 >
 >
 >
 >
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: [hidden email]
 >For additional commands, e-mail: [hidden email]
 >

Takashi Ono ([hidden email])

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: python26 - looking for porters (issue 92413)

Takashi Ono
Hi Joerg,

I have resolved the problems. The probles related to version 2.6.1 only reside in
python module itself and pyuno/loader (changing extension to .pyd). Other problems also
exist in current version and I will handle them in an mingw port issue. I will raise
another issue for Python 2.6.1 dependent to your original issue.

Best Regards,

In message "Re: [porting-dev] python26 - looking for porters (issue 92413)",
Takashi Ono wrote...
 >Hello Joerg,
 >
 >I am doing mingw port. Currently mingw port is still experimental and actually python
 >module is not well tested. I want to make it really work.
 >
 >I am facing a couple of problems.
 >
 >1. Compilation of scripts
 >All the installed scripts are compiled when "make install" is invoked. However, some
 >compilation fails as they include unicode escape '\\N'. The compiler tries to load
 >unicodedata extension module but it is not yet installed.
 >
 >There is a workaround to add sharedinstall to the dependency rule of libinstall and
 >append the directory to PYTHONPATH at the line invoing compileall.py, but I do not
know
 >why it does not occur on other platforms and am not sure it is a good fix. Do they
know
 >the location of the unicodedata dynamic loading module in temp directory?
 >
 >2. Stripping of symbols in python.exe
 >The symbols in binary files created in mingw build should be stripped when making
 >install set. It is handled by a perl script solenv/bin/modules/installer/strip.pm.
Most
 >part of the code is copied from the one for unix platforms. It copies the file to a
 >working directory, strip the symbols and save the name of the stripped file to use
 >instead of the original source afterwards.
 >The problem is that the script uses only one directory for one language. The files
not
 >language specific use the same directory. The wrapper pyuno/python.exe for windows is
 >overwritten by the python.exe in python-core during the stripping process.
 >
 >The current workaround is to handle pyuno/python,exe as an exceptional case and use a
 >unique directory. I do not think it is an elegant solution. Maybe it is better to
 >rename the core binary to have a unique name. I have not tried yet.
 >
 >3. QA-3 is failing
 >That is it. I would like to have suggestions where should I investigate.
 >
 >Best Regards,

----
 Takashi Ono(HK Freak)
 mailto:[hidden email] or [hidden email]
        (Personal Address, checked every morning/evening and holidays)
 mailto:[hidden email]
        (Address for business, checked every working days)
 http://www.hkfreak.net

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: python26 - looking for porters (issue 92413)

Rene Engelhard-7
Hi,

Takashi Ono wrote:
> I have resolved the problems. The probles related to version 2.6.1 only reside in
> python module itself and pyuno/loader (changing extension to .pyd). Other problems also
> exist in current version and I will handle them in an mingw port issue. I will raise
> another issue for Python 2.6.1 dependent to your original issue.

please attach them to an issue and tell the nr so it can be added to the
cws (and jbu apply it whenever he thinks it's time for that - the Mac OS X
or FReebSD things are also still NEW although having patches).

I think we should aim to get rid of the stone-aged python 2.3 (not even Debian
oldstable contains it which tells much ;)) asap....

Regards,

Rene

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: python26 - looking for porters (issue 92413)

Takashi Ono
Hi Rene,

In message "Re: [porting-dev] python26 - looking for porters (issue 92413)",
Rene Engelhard wrote...
 >please attach them to an issue and tell the nr so it can be added to the
 >cws (and jbu apply it whenever he thinks it's time for that - the Mac OS X
 >or FReebSD things are also still NEW although having patches).
 >
 >I think we should aim to get rid of the stone-aged python 2.3 (not even Debian
 >oldstable contains it which tells much ;)) asap....
 >
 >Regards,
 >
 >Rene

I have raised i107077 for python2.3 and i107079 for python 2.6. I am fixing i107077 in
cws mingwport19 and assigned i107079 to jbu.

Best Regards,

Takashi Ono ([hidden email])

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]