maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [Announce] Python3.2 (3.2.3) on extras-devel (https://talk.maemo.org/showthread.php?t=91777)

AapoRantalainen 2013-11-11 18:15

[Announce] Python3.2 (3.2.3) on extras-devel
 
1 Attachment(s)
Python3.2 on extras-devel.

Compiled with gcc-4.6, so only armel (it can't be compiled with gcc-4.2), without docs (I can locally generate docs, but not in autobuilder). Seems to work.

I'm eager to see packages using it.

marmistrz 2013-11-11 19:30

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Quote:

Originally Posted by AapoRantalainen (Post 1385656)
Python3.2 on extras-devel.

Compiled with gcc-4.6, so only armel (it can't be compiled with gcc-4.2), without docs (I can locally generate docs, but not in autobuilder). Seems to work.

I'm eager to see packages using it.

Do you plan to go one step further, to python3.3?

AapoRantalainen 2013-11-11 20:37

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Quote:

Originally Posted by marmistrz (Post 1385670)
Do you plan to go one step further, to python3.3?

Is this challenge (only), or is there something You can do with python3.3, but not with python3.2?

seanmcken 2013-11-12 06:19

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
can u plz plz tell what'd be advantages after installing this? plz tell

AapoRantalainen 2013-11-12 06:36

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Python2 and python3 are scripting languages. They are "very similar but still different languages". https://wiki.python.org/moin/Python2orPython3

Quote:

Originally Posted by seanmcken (Post 1385729)
can u plz plz tell what'd be advantages after installing this? plz tell

*If you find software written for python3 you can now run it on Fremantle (without converting it to python2).
*If you are planning to write python application for Fremantle, you can use python3, instead of python2.
(*We might soon see Qt5+Python3+PyOtherSide: http://talk.maemo.org/showpost.php?p...&postcount=387)

seanmcken 2013-11-12 07:12

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
@AapoRantalainen
Thnk you very much, may god bless you buddy :)

pierrem 2013-11-12 10:35

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Thanks AapoRantalainen

would it be possible to have setuptools packaged to ease the installation of python softwares ?

marmistrz 2013-11-12 15:38

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Quote:

Originally Posted by AapoRantalainen (Post 1385687)
Is this challenge (only), or is there something You can do with python3.3, but not with python3.2?

Well, python3.3 has lzma, python3.2 doesn't. I remember the same happening with zipfile module - we had python2.5 on device and couldn't run software because 2.6 introduced zipfile. But it's not a be-all, end-all.

marmistrz 2013-12-21 16:39

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Aapo, what about python3 package to support /usr/bin/python3, py3version (and possibly dh-python later on)

marmistrz 2014-03-23 16:13

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Aapo, can you please optify it?

MartinK 2014-03-27 23:29

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Quote:

Originally Posted by marmistrz (Post 1418195)
Aapo, can you please optify it?

A big +1 from me for this. A properly optified Python 3.2 should make the modRana Qt 5 & Python 3 based GUI (once I finally get it working) much more accessible to users. :)

peterleinchen 2014-03-28 05:43

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
I would also like an optified version, as my rootfs is almost full (still may optify it a bit manually).

But another question here, if it is possible at all?
If yes would it be possible to optify python-2.5 (moving /usr/lib/python-2.5/ to opt), which is 'wasting' over 20MB on rootfs?

pichlo 2014-03-28 06:41

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Quote:

Originally Posted by peterleinchen (Post 1418825)
If yes would it be possible to optify python-2.5 (moving /usr/lib/python-2.5/ to opt), which is 'wasting' over 20MB on rootfs?

Does it? I thought Python 2.5 was the ultimate (horrible, IMO) example of optification on Maemo through mounting.

Code:

~ $ mount
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (rw,bulk_read,no_chk_data_crc)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,noatime,size=1024k)
tmpfs on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
none on /dev type tmpfs (rw,noatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noatime,size=65536k)
/dev/mmcblk0p2 on /home type ext3 (noatime,nodiratime,errors=continue,commit=1,data=writeback)
/home/opt on /opt type none (bind,rbind)
nodev on /sys/kernel/debug type debugfs (0)
/opt/pymaemo/usr/lib/python2.5 on /usr/lib/python2.5 type bind (bind,rbind)
/opt/pymaemo/usr/share/pyshared on /usr/share/pyshared type bind (bind,rbind)
/opt/pymaemo/usr/lib/pyshared on /usr/lib/pyshared type bind (bind,rbind)
/opt/pymaemo/usr/share/python-support on /usr/share/python-support type bind (bind,rbind)
/opt/pymaemo/usr/lib/python-support on /usr/lib/python-support type bind (bind,rbind)
/dev/mmcblk0p1 on /home/user/MyDocs type vfat (rw,noauto,nodev,exec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0000,rodir)
/dev/mmcblk1p1 on /media/mmc1 type vfat (rw,noauto,nodev,exec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0000,rodir)
~ $


peterleinchen 2014-03-28 07:00

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Ups, sorry.

Yes, read that part of mount so often that it seems I do ignore it fully.
:mad: damn, thought I could free up some space... [down to 10MB]


--edit (OT)
Just checked once more (and it is actually 79.8 MB ;)).
But why I thought so is
du -xsh /usr/lib/
shows 79.8 for python2.5. And -x should not show space on other file system. Seems a mounted (different) file system is not recognized by 'du'?

reinob 2014-03-28 08:48

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
@peterleinchen

If I do "du -h /usr/lib" I get 201.5M. If I do "du -xh /usr/lib" I get 141.4M.

Doing a diff on both outputs it is clear that "-xh" omits/ignores the 3 directories that are bind-mounted on /usr/lib, i.e. python2.5, pyshared and python-support.

You are probably doing "du -xsh /usr/lib/*" (note the "*") which is effectively overriding the "-x" by telling du explicitly to calculate the size of every directory under /usr/lib/, that is, including those [r]bind-mounted.

peterleinchen 2014-03-28 18:44

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Yes, exactly that is. (I expected a different behaviour, but from the view of directory hierarchy this makes sense.)

Muchos gracias.

-- end of OT

AapoRantalainen 2014-04-20 08:06

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Optified python3.4.0 on extras-devel. Thanks for Your patience.

This time no Debian/Ubuntu-stuff, but I started with sources straight from the upstream [https://www.python.org/ftp/python/3....thon-3.4.0.tgz]. Everything is now in one big (22Mb) package, called python3.

Ok, this is loaned from Debian (but expat and libmpdec compiled-in)
Code:

./configure --prefix=/opt/python3/ \
                --enable-ipv6 \
                --enable-loadable-sqlite-extensions \
                --with-dbmliborder=bdb:gdbm \
                --with-computed-gotos \
                --without-ensurepip \
                --without-system-expat \
                --without-system-libmpdec

(Request for comments about parameters)

And symlink /usr/bin/python3 -> /opt/python3/bin/python3.4
(This all looks so obvious now, but trust me this took some time to tinker)

Btw: It is compiled with default compiler on auto builder.

AapoRantalainen 2014-04-20 08:12

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
And of cource you should be interested in test-results (feel free to run on your device, tests are installed):
I dont yet understand everything, feel free to comment what are critical.

Code:

cd /opt/python3/lib/python3.4/test/
time python3 regrtest.py

(modified results:)
Code:

== CPython 3.4.0 (default, Apr 19 2014, 16:37:49) [GCC 4.2.1]
==  Linux-2.6.28.10-power52-armv7l-with-debian-testing-unstable little-endian
==  hash algorithm: siphash24 32bit
==  /var/tmp/test_python_22590
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[  6/389] test_types
Warning -- locale was modified by test_types
[ 23/389] test_asyncio
test_asyncio skipped -- cannot import name '_base'
[ 40/389] test_calendar
Warning -- locale was modified by test_calendar
[ 60/389] test_codecmaps_cn
test_codecmaps_cn skipped -- Use of the 'urlfetch' resource not enabled
[ 61/389] test_codecmaps_hk
test_codecmaps_hk skipped -- Use of the 'urlfetch' resource not enabled
[ 62/389] test_codecmaps_jp
test_codecmaps_jp skipped -- Use of the 'urlfetch' resource not enabled
[ 63/389] test_codecmaps_kr
test_codecmaps_kr skipped -- Use of the 'urlfetch' resource not enabled
[ 64/389] test_codecmaps_tw
test_codecmaps_tw skipped -- Use of the 'urlfetch' resource not enabled
[ 71/389] test_compileall
test test_compileall failed -- Traceback (most recent call last):
  File "/opt/python3/lib/python3.4/test/test_compileall.py", line 194, in test_no_args_respects_force_flag
    self.assertRunOK('-f', PYTHONPATH=self.directory)
  File "/opt/python3/lib/python3.4/test/test_compileall.py", line 144, in assertRunOK
    *self._get_run_args(args), **env_vars)
  File "/opt/python3/lib/python3.4/test/script_helper.py", line 69, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
  File "/opt/python3/lib/python3.4/test/script_helper.py", line 55, in _assert_python
    "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is 1, stderr follows:

[ 73/389/1] test_concurrent_futures
test_concurrent_futures skipped -- No module named '_multiprocessing'
[ 83/389/1] test_ctypes
test test_ctypes failed -- multiple errors occurred; run in verbose mode for details
[ 84/389/2] test_curses
test_curses skipped -- Use of the 'curses' resource not enabled
[ 96/389/2] test_devpoll
test_devpoll skipped -- select.devpoll not defined
[101/389/2] test_distutils
unable to execute gcc: No such file or directory
unable to execute gcc: No such file or directory
unable to execute gcc: No such file or directory
unable to execute gcc: No such file or directory
test test_distutils failed -- multiple errors occurred; run in verbose mode for details
[124/389/3] test_float
Warning -- locale was modified by test_float
[139/389/3] test_gdb
test_gdb skipped -- test_gdb only works on source builds at the moment.
[181/389/3] test_kqueue
test_kqueue skipped -- test works only on BSD
[187/389/3] test_locale
Warning -- locale was modified by test_locale
[206/389/3] test_msilib
test_msilib skipped -- No module named 'msilib'
[208/389/3] test_multiprocessing_fork
test_multiprocessing_fork skipped -- No module named '_multiprocessing'
[209/389/3] test_multiprocessing_forkserver
test_multiprocessing_forkserver skipped -- No module named '_multiprocessing'
[210/389/3] test_multiprocessing_main_handling
test_multiprocessing_main_handling skipped -- No module named '_multiprocessing'
[211/389/3] test_multiprocessing_spawn
test_multiprocessing_spawn skipped -- No module named '_multiprocessing'
[223/389/3] test_ossaudiodev
test_ossaudiodev skipped -- Use of the 'audio' resource not enabled
[292/389/3] test_smtpnet
test_smtpnet skipped -- Use of the 'network' resource not enabled
[295/389/3] test_socketserver
test_socketserver skipped -- Use of the 'network' resource not enabled
[300/389/3] test_startfile
test_startfile skipped -- object <module 'os' from '/opt/python3/lib/python3.4/os.py'> has no attribute 'startfile'
[307/389/3] test_strptime
Warning -- locale was modified by test_strptime
[312/389/3] test_subprocess
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
test test_subprocess failed -- multiple errors occurred; run in verbose mode for details
[318/389/4] test_sys
test test_sys failed -- Traceback (most recent call last):
  File "/opt/python3/lib/python3.4/test/test_sys.py", line 605, in test_executable
    self.assertEqual(os.path.abspath(sys.executable), sys.executable)
AssertionError: '/opt/python3/bin/python3' != '/opt/python3/lib/python3.4/test/../../../bin/python3'
- /opt/python3/bin/python3
+ /opt/python3/lib/python3.4/test/../../../bin/python3

[336/389/5] test_timeout
test_timeout skipped -- Use of the 'network' resource not enabled
[337/389/5] test_tk
test_tk skipped -- Use of the 'gui' resource not enabled
[338/389/5] test_tokenize
[339/389/5] test_tools
test_tools skipped -- test irrelevant for an installed Python
[343/389/5] test_ttk_guionly
test_ttk_guionly skipped -- Use of the 'gui' resource not enabled
[358/389/5] test_urllib2net
test_urllib2net skipped -- Use of the 'network' resource not enabled
[360/389/5] test_urllibnet
test_urllibnet skipped -- Use of the 'network' resource not enabled
[367/389/5] test_venv
test test_venv failed -- multiple errors occurred; run in verbose mode for details
[375/389/6] test_winreg
test_winreg skipped -- No module named 'winreg'
[376/389/6] test_winsound
test_winsound skipped -- Use of the 'audio' resource not enabled
[384/389/6] test_xmlrpc_net
test_xmlrpc_net skipped -- Use of the 'network' resource not enabled
[386/389/6] test_zipfile64
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
348 tests OK.
6 tests failed:
    test_compileall test_ctypes test_distutils test_subprocess
    test_sys test_venv
5 tests altered the execution environment:
    test_calendar test_float test_locale test_strptime test_types
30 tests skipped:
    test_asyncio test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
    test_codecmaps_kr test_codecmaps_tw test_concurrent_futures
    test_curses test_devpoll test_gdb test_kqueue test_msilib
    test_multiprocessing_fork test_multiprocessing_forkserver
    test_multiprocessing_main_handling test_multiprocessing_spawn
    test_ossaudiodev test_smtpnet test_socketserver test_startfile
    test_timeout test_tk test_tools test_ttk_guionly test_urllib2net
    test_urllibnet test_winreg test_winsound test_xmlrpc_net
    test_zipfile64

real    85m24.808s
user    71m53.664s
sys    5m36.367s


You can run simple test with (e.g)
Code:

root
python3 regrtest.py test_zipfile64


[EDIT]
Tests 60,61,62,63,64
You need write access to the directory:
Code:

chown -R user /opt/python3/lib/python3.4/test
And 'resource urlfetch'
Code:

python3 regrtest.py -uurlfetch test_codecmaps_cn test_codecmaps_hk  test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw
[/EDIT]

Sohil876 2014-04-20 09:09

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Quote:

Originally Posted by AapoRantalainen (Post 1422000)
Optified python3.4.0 on extras-devel. Thanks for Your patience.

This time no Debian/Ubuntu-stuff, but I started with sources straight from the upstream [https://www.python.org/ftp/python/3....thon-3.4.0.tgz]. Everything is now in one big (22Mb) package, called python3.

Ok, this is loaned from Debian (but expat and libmpdec compiled-in)
Code:

./configure --prefix=/opt/python3/ \
                --enable-ipv6 \
                --enable-loadable-sqlite-extensions \
                --with-dbmliborder=bdb:gdbm \
                --with-computed-gotos \
                --without-ensurepip \
                --without-system-expat \
                --without-system-libmpdec

(Request for comments about parameters)

And symlink /usr/bin/python3 -> /opt/python3/bin/python3.4
(This all looks so obvious now, but trust me this took some time to tinker)

Btw: It is compiled with default compiler on auto builder.

Thanks. A little ot request i know but if you have spare time can you also upload pygame for this python version?

MartinK 2014-04-20 10:47

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Quote:

Originally Posted by AapoRantalainen (Post 1422000)
Optified python3.4.0 on extras-devel. Thanks for Your patience.

This time no Debian/Ubuntu-stuff, but I started with sources straight from the upstream [https://www.python.org/ftp/python/3....thon-3.4.0.tgz]. Everything is now in one big (22Mb) package, called python3.

Ok, this is loaned from Debian (but expat and libmpdec compiled-in)
Code:

./configure --prefix=/opt/python3/ \
                --enable-ipv6 \
                --enable-loadable-sqlite-extensions \
                --with-dbmliborder=bdb:gdbm \
                --with-computed-gotos \
                --without-ensurepip \
                --without-system-expat \
                --without-system-libmpdec

(Request for comments about parameters)

And symlink /usr/bin/python3 -> /opt/python3/bin/python3.4
(This all looks so obvious now, but trust me this took some time to tinker)

Btw: It is compiled with default compiler on auto builder.

Thanks a lot ! With this & the Qt 5 port only PyOtherSide is needed to enable the modRana Qt 5 GUI & other Python 3 & Qt 5 apps to run on the N900. :)

BTW, we now have the same version of Python Sailfish has (3.4), which is even newer than the Python version in the latest Fedora (3.3). :D

int_ua 2014-09-28 02:48

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Is it easy to make tkinter module optional? tk8.5+tcl8.5+blt are 10M of our precious space and I'm not aware about any package that actually uses python tkinter module even on python2. Are there any in maemo repos?

Update: why did you disable pip?
Code:

--without-ensurepip \
vs
Code:

--with-ensurepip=install

marmistrz 2014-09-28 10:24

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
int_ua: so why don't you optify it? ;) 'Cause if it's on opt, it doesn't matter that much

marmistrz 2014-11-11 11:50

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Aapo, what about porting `python3-defaults` so that python3 modules can be built? We're porting the modules for 2.7, so maybe we could then build it for 3 at the same time, if python3-defaults were available.

AapoRantalainen 2014-11-11 19:17

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Doh,
Currently we have 'python-3.4.0' which is not coming from any debian source packages, but straight from the upstream. This is because rebuilding of debian's package needed so much extra dependencies and was too hard to optify.
Now I'm not sure how to continue.

This is list of binary-packages build from the source package python3-defaults

Code:

Package: python3
Package: python3-venv
Package: python3-minimal
Package: python3-examples
Package: python3-dev
Package: libpython3-dev
Package: libpython3-stdlib
Package: idle3
Package: python3-doc
Package: python3-dbg
Package: libpython3-dbg
Package: python3-all
Package: python3-all-dev
Package: python3-all-dbg
Package: libpython3-all-dev
Package: libpython3-all-dbg

Seems all these are just meta packages pointing to the proper versioned package, which is now merged to the massive 'python-3'? I quickly checked, but not yet pushed anything to the buildserver.

marmistrz 2014-11-12 06:57

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Not only. one of the python3 packages provides for example python3.mk, which is used by debian/rules of python packages. Of course it gives this "python3" command. It's all I can give you off the top of my head

marmistrz 2014-12-01 20:39

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Aapo: would you be so king to state the state, please?

We're doing a big porting project[1], so that migration from our ancient py 2.5 is possible and the lack of information stalls the whole process.

I'm coordinating the porting so I'd like to know what your decision on python3-defaults is. Are you still thinking whether to do it or not? Are you simply too busy to do anything? Any answer here is much better than not knowing at all.

Thanks

[1] http://talk.maemo.org/showpost.php?p...70&postcount=1

AapoRantalainen 2014-12-03 19:58

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
Quote:

Originally Posted by marmistrz (Post 1450150)
Aapo: would you be so king to state the state, please?

I'm coordinating the porting so I'd like to know what your decision on python3-defaults is. Are you still thinking whether to do it or not? Are you simply too busy to do anything?

I tried to do python3-defaults, but it wasn't trivial. (Maybe some empty hacky metapackages would work, but then some important files must be shipped somehow anyway.)

This time I quit and confess: I don't have time for this project. I really respect your work (my primary phone is still N900).

marmistrz 2014-12-03 20:04

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
OK. Thanks for replying.

Are you uploading your port of 3.4? iirc you have it working?
If yes, I'll try something with python3-defaults. Could you upload your copy with your changes somewhere, for reference?

marmistrz 2014-12-05 18:27

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
OK,

I managed to build python3-defaults. It builds and it's the only thing it does for the time being (until I adjust the dependencies correctly). I can't and won't proceed until Aapo's python3.4 lands in the repos.

int_ua 2015-04-10 10:37

Re: [Announce] Python3.2 (3.2.3) on extras-devel
 
To make pyvenv work (finally, I had time to setup pip on Maemo):
Code:

sudo mount -o remount,size=5M -t tmpfs tmpfs /tmp


All times are GMT. The time now is 19:00.

vBulletin® Version 3.8.8