Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-07-21 Thread Alexandru Ardelean
It's still turned off.
But it was turned off again, once it was moved to Github.
There was a more recent discussion here:
https://github.com/openwrt/packages/issues/474

[ Quick answer here: yes we can precompile bytecodes at build-time and ship
those instead ]

So, .py  vs  .pyc  vs  .pyo  is a recurring question.

.py - python source file
.pyc - compiled bytecodes (from .py file)
.pyo - compiled optimized bytecodes (not sure yet what optimized means)

Which of these 3 formats should the Python libraries use to be packaged ?
Opinions differ here.

At the time I packaged python, it seemed logical that .py files should be
it; that's how most how distros get Python packaged.
But then, .py files automatically generate .pyc files that fill up RAM or
Flash, so that was disabled [ for the OpenWRT case ].

But now that I re-think about it [for the OpenWRT case] maybe changing to
.pyo would be better, since it would optimize performance (size  speed).
And then the source files could be re-packaged to python-sources [ or
something ] .
One proposal was a bit backwards in logic: i.e. package Python libs as are
now, and package Python bytecodes in additional+installable packages.
My main preference here, is that I wouldn't want to give up the convenience
of having Python source files, which is why I prefer[ed] to sacrifice
performance in the first place.
[ And then, nobody complained yet loud enough to change this ].

So, this python packages to bytecode conversion + python sources packages
would be an interesting idea to do.


On Tue, Jul 21, 2015 at 11:48 PM, valent.turko...@gmail.com 
valent.turko...@gmail.com wrote:

 Just found this --

 https://dev.openwrt.org/browser/packages/lang/python/files/python-package.mk?rev=13921
 -- which suggests that 7 years ago .pyc file creation was turned OFF
 for Python.

 I can only assume that it was because of the SquashFS issue, so my
 question is: Can we precompile Python files at image creation time so
 that they can be included in the SquashFS from the beginning. Maybe a
 cross-compiling guru can enlighten us?

 On 2 July 2015 at 11:25, Alexandru Ardelean ardeleana...@gmail.com
 wrote:
  Will make time to update Python :)
 
 
  On Thu, Jul 2, 2015 at 11:51 AM, valent.turko...@gmail.com
  valent.turko...@gmail.com wrote:
 
  Come on guys help me out with Python wiki page, it looks like I know
  much less about python that you and I'm the only one documenting this
  which is bad :)
 
  Take a look at latest version:
  http://wiki.openwrt.org/doc/software/python
 
  On 27 June 2015 at 22:42, Christian Mehlis christ...@m3hlis.de wrote:
   Am 26.06.2015 um 14:57 schrieb valent.turko...@gmail.com:
  
   Does micro-python have some alternative or replacement for pyserial?
  
  
   you can use stty[1] from busybox to configure the tty.
   After that every program can use regular read/write calls...
  
   [1] http://unixhelp.ed.ac.uk/CGI/man-cgi?stty
  
   Best
   Christian
  
   ___
   openwrt-devel mailing list
   openwrt-devel@lists.openwrt.org
   https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
 

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-07-21 Thread valent.turko...@gmail.com
Just found this --
https://dev.openwrt.org/browser/packages/lang/python/files/python-package.mk?rev=13921
-- which suggests that 7 years ago .pyc file creation was turned OFF
for Python.

I can only assume that it was because of the SquashFS issue, so my
question is: Can we precompile Python files at image creation time so
that they can be included in the SquashFS from the beginning. Maybe a
cross-compiling guru can enlighten us?

On 2 July 2015 at 11:25, Alexandru Ardelean ardeleana...@gmail.com wrote:
 Will make time to update Python :)


 On Thu, Jul 2, 2015 at 11:51 AM, valent.turko...@gmail.com
 valent.turko...@gmail.com wrote:

 Come on guys help me out with Python wiki page, it looks like I know
 much less about python that you and I'm the only one documenting this
 which is bad :)

 Take a look at latest version:
 http://wiki.openwrt.org/doc/software/python

 On 27 June 2015 at 22:42, Christian Mehlis christ...@m3hlis.de wrote:
  Am 26.06.2015 um 14:57 schrieb valent.turko...@gmail.com:
 
  Does micro-python have some alternative or replacement for pyserial?
 
 
  you can use stty[1] from busybox to configure the tty.
  After that every program can use regular read/write calls...
 
  [1] http://unixhelp.ed.ac.uk/CGI/man-cgi?stty
 
  Best
  Christian
 
  ___
  openwrt-devel mailing list
  openwrt-devel@lists.openwrt.org
  https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-07-02 Thread valent.turko...@gmail.com
Come on guys help me out with Python wiki page, it looks like I know
much less about python that you and I'm the only one documenting this
which is bad :)

Take a look at latest version:
http://wiki.openwrt.org/doc/software/python

On 27 June 2015 at 22:42, Christian Mehlis christ...@m3hlis.de wrote:
 Am 26.06.2015 um 14:57 schrieb valent.turko...@gmail.com:

 Does micro-python have some alternative or replacement for pyserial?


 you can use stty[1] from busybox to configure the tty.
 After that every program can use regular read/write calls...

 [1] http://unixhelp.ed.ac.uk/CGI/man-cgi?stty

 Best
 Christian

 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-07-02 Thread Alexandru Ardelean
Will make time to update Python :)


On Thu, Jul 2, 2015 at 11:51 AM, valent.turko...@gmail.com 
valent.turko...@gmail.com wrote:

 Come on guys help me out with Python wiki page, it looks like I know
 much less about python that you and I'm the only one documenting this
 which is bad :)

 Take a look at latest version:
 http://wiki.openwrt.org/doc/software/python

 On 27 June 2015 at 22:42, Christian Mehlis christ...@m3hlis.de wrote:
  Am 26.06.2015 um 14:57 schrieb valent.turko...@gmail.com:
 
  Does micro-python have some alternative or replacement for pyserial?
 
 
  you can use stty[1] from busybox to configure the tty.
  After that every program can use regular read/write calls...
 
  [1] http://unixhelp.ed.ac.uk/CGI/man-cgi?stty
 
  Best
  Christian
 
  ___
  openwrt-devel mailing list
  openwrt-devel@lists.openwrt.org
  https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-06-27 Thread Christian Mehlis

Am 26.06.2015 um 14:57 schrieb valent.turko...@gmail.com:

Does micro-python have some alternative or replacement for pyserial?


you can use stty[1] from busybox to configure the tty.
After that every program can use regular read/write calls...

[1] http://unixhelp.ed.ac.uk/CGI/man-cgi?stty

Best
Christian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-06-26 Thread micke . prag

Hi,

I have just created a pull request for an updated version of pyserial.
https://github.com/openwrt/packages/pull/1485

Regards
Micke Prag

2015-06-26 15:26 skrev Alexandru Ardelean:

Ah, since that email, python became: - python-base - just the minimal 
to

have a python interpreter running - python-light - is a dynamic
package; it's python (full) minus all other python-codecs,
python-compiler, etc - python - full python install, minus a few 
stuff I

considered that could be stripped [to reduce size], like tests [per
module], some python-tk/tcl [GUI] libs

The idea of python-light is that, whenever you move a Python built-in
module from python-light into a separate package (like 
python-codecs),

python-light gets lighter.

The mechanism is fairly dynamic; you just need to add a new
'python-package-xxx.mk [3]' file with some basic Makefile rules, 
and

that's it.

People can choose to install python-base if they need like
really-really-really-really basic python (a = b + c and maybe some 
other

syntax).
Then they can choose to install other optional packages.
But for most cases, maybe python-light would be sufficient.

The above is also true for python3.

On Fri, Jun 26, 2015 at 4:15 PM, valent.turko...@gmail.com
valent.turko...@gmail.com wrote:


On 24 October 2014 at 11:10, Alexandru Ardelean
ardeleana...@gmail.com wrote:
 python-mini is now just python.

Thanks for clarification, I'll add that info on Python OpenWrt Wiki
page [1].

I tried installing python package on Caos Calmer rc2 and I get a 
bunch

of dependencies installed automatically and they use up bunch of
space. I didn't notice that python-mini package installed lots of
dependencies on Barrier Breaker, but I'm not 100% sure.

Was python-mini package on BB python without any dependencies and
python same package but with all added dependencies?

[1] http://wiki.openwrt.org/doc/software/python [1]


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel [2]



Links:
--
[1] http://wiki.openwrt.org/doc/software/python
[2] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[3] http://python-package-xxx.mk
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-06-26 Thread valent.turko...@gmail.com
Does micro-python have some alternative or replacement for pyserial?

On 31 October 2014 at 08:52, Alexandru Ardelean ardeleana...@gmail.com wrote:
 python has been moved to Github
 https://github.com/openwrt/packages/tree/master/lang/python

 python-mini will be rebooted;

 the whole python package needs a bit of revamp/cleanup especially since it's
 been upgraded to version 2.7.8

 as for python-smbus and pyserial, someone will have to maintain those;
 otherwise they'll just stay in old packages, while other packages get moved
 to Github



 On Fri, Oct 31, 2014 at 8:05 AM, smile...@gmail.com wrote:

 python-smbus/serial depends still on python-mini
 python and python-mini is missing.

 ?


 Am Fri, 24 Oct 2014 12:10:32 +0300
 schrieb Alexandru Ardelean ardeleana...@gmail.com:

  python-mini is now just python.
 
 
 
  On Fri, Oct 24, 2014 at 12:06 PM, Claudio Thomas
  c...@xmodus-systems.de wrote:
 
Hi,
   python-mini is missing in oldpackages (trunk), is there an
   alternative for python-mini?
   I need it for pyserial, which depends on python-mini, and still
   exists in oldpackages (trunk).
  
   What about micropython+micropython-lib?
   Has anyone already tested this as replacement?
  
   Thanks,
   Claudio
   --
   Working on OpenWrt BB for XM1700E
   http://www.xmodus-systems.de/en/terminals/routers.html
  
   ___
   openwrt-devel mailing list
   openwrt-devel@lists.openwrt.org
   https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
  
  


 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-06-26 Thread valent.turko...@gmail.com
On 24 October 2014 at 11:10, Alexandru Ardelean ardeleana...@gmail.com wrote:
 python-mini is now just python.

Thanks for clarification, I'll add that info on Python OpenWrt Wiki page [1].

I tried installing python package on Caos Calmer rc2 and I get a bunch
of dependencies installed automatically and they use up bunch of
space. I didn't notice that python-mini package installed lots of
dependencies on Barrier Breaker, but I'm not 100% sure.

Was python-mini package on BB python without any dependencies and
python same package but with all added dependencies?

[1] http://wiki.openwrt.org/doc/software/python
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-06-26 Thread Alexandru Ardelean
Ah, since that email,  python became:
- python-base - just the minimal to have a python interpreter running
- python-light - is a dynamic package; it's python (full) minus all other
python-codecs, python-compiler, etc
- python - full python install, minus a few stuff I considered that could
be stripped [to reduce size], like tests [per module],  some python-tk/tcl
[GUI] libs

The idea of python-light is that, whenever you move a Python built-in
module from python-light into a separate package (like python-codecs),
python-light gets lighter.
The mechanism is fairly dynamic; you just need to add a new '
python-package-xxx.mk' file with some basic Makefile rules, and that's
it.

People can choose to install python-base if they need like
really-really-really-really basic python (a = b + c and maybe some other
syntax).
Then they can choose to install other optional packages.
But for most cases, maybe python-light would be sufficient.

The above is also true for python3.



On Fri, Jun 26, 2015 at 4:15 PM, valent.turko...@gmail.com 
valent.turko...@gmail.com wrote:

 On 24 October 2014 at 11:10, Alexandru Ardelean ardeleana...@gmail.com
 wrote:
  python-mini is now just python.

 Thanks for clarification, I'll add that info on Python OpenWrt Wiki page
 [1].

 I tried installing python package on Caos Calmer rc2 and I get a bunch
 of dependencies installed automatically and they use up bunch of
 space. I didn't notice that python-mini package installed lots of
 dependencies on Barrier Breaker, but I'm not 100% sure.

 Was python-mini package on BB python without any dependencies and
 python same package but with all added dependencies?

 [1] http://wiki.openwrt.org/doc/software/python

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2014-10-31 Thread Alexandru Ardelean
python has been moved to Github
https://github.com/openwrt/packages/tree/master/lang/python

python-mini will be rebooted;

the whole python package needs a bit of revamp/cleanup especially since
it's been upgraded to version 2.7.8

as for python-smbus and pyserial, someone will have to maintain those;
otherwise they'll just stay in old packages, while other packages get moved
to Github



On Fri, Oct 31, 2014 at 8:05 AM, smile...@gmail.com wrote:

 python-smbus/serial depends still on python-mini
 python and python-mini is missing.

 ?


 Am Fri, 24 Oct 2014 12:10:32 +0300
 schrieb Alexandru Ardelean ardeleana...@gmail.com:

  python-mini is now just python.
 
 
 
  On Fri, Oct 24, 2014 at 12:06 PM, Claudio Thomas
  c...@xmodus-systems.de wrote:
 
Hi,
   python-mini is missing in oldpackages (trunk), is there an
   alternative for python-mini?
   I need it for pyserial, which depends on python-mini, and still
   exists in oldpackages (trunk).
  
   What about micropython+micropython-lib?
   Has anyone already tested this as replacement?
  
   Thanks,
   Claudio
   --
   Working on OpenWrt BB for XM1700E
   http://www.xmodus-systems.de/en/terminals/routers.html
  
   ___
   openwrt-devel mailing list
   openwrt-devel@lists.openwrt.org
   https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
  
  


 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2014-10-24 Thread Alexandru Ardelean
python-mini is now just python.



On Fri, Oct 24, 2014 at 12:06 PM, Claudio Thomas c...@xmodus-systems.de
wrote:

  Hi,
 python-mini is missing in oldpackages (trunk), is there an alternative
 for python-mini?
 I need it for pyserial, which depends on python-mini, and still exists
 in oldpackages (trunk).

 What about micropython+micropython-lib?
 Has anyone already tested this as replacement?

 Thanks,
 Claudio
 --
 Working on OpenWrt BB for XM1700E
 http://www.xmodus-systems.de/en/terminals/routers.html

 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel