Re: upgrading python on raspbian

2019-10-16 Thread Cousin Stanley
Gene Heskett wrote:

> Continueing this thread, I now have a missing function by name, "units",
> that is preventing LinuxCNC from running.
> 
> Where in the python 3 world do I find that function?,
> 

  Under debian buster there is a python 2 package
  called  python-quantities  that apparently
  deals with units via numpy dependencies.

  $ apt-cache show python-quantities
  Package: python-quantities
  Version: 0.12.1-1
  Priority: optional
  Section: python
  Maintainer: Debian Science Maintainers 
  
  Installed-Size: 358 kB
  Depends: python (<< 2.8), python (>= 2.7), python:any (>= 2.6.6-7~),
   python-numpy
  Suggests: python-unittest2
  
  Description-en: Library for computation of physical quantities 
  with units, based on numpy  Quantities is designed to handle 
  arithmetic and conversions of physical quantities, which have 
  a magnitude, dimensionality specified by various units, 
  and possibly an uncertainty.  Quantities builds on 
  the popular numpy library and is designed to work with 
  numpy ufuncs, many of which are already supported.
  

  Also 

  $ apt-files list python-quantities
  
  Shows a  units  sub-directory under /usr/lib/python2.7/dist-packages
  with several individual modules such as force, length, mass, pressue,
  temperature, etc.

  Seems to be also available throug the python package index 

https://pypi.org/project/quantities/

$ pip install quantities


  I have  no  personal expeience with this package.



-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: upgrading python on raspbian

2019-10-15 Thread Gene Heskett
On Tuesday 15 October 2019 11:10:41 Dennis Lee Bieber wrote:

> On Tue, 15 Oct 2019 01:30:59 -0400, Gene Heskett
> 
>
> declaimed the following:
> >On Monday 14 October 2019 12:56:22 Gene Heskett wrote:
> >
> >Continueing this thread, I now have a missing function by name,
> > "units", that is preventing LinuxCNC from running.
> >
> >Where in the python 3 world do I find that function?, which in this
> > case controls what it is fed on to a pyvcp display according to a
> > logic signal that tells it whether the machine is in inches mode, or
> > mm mode?
>
>   Well, search your sources for where it is first referenced...
>
>   There can only be three "hiding places" for a bare units() function.
>
> Local file:
>
> def units(...):
>   ...
>
> Imported module:
>
> from module import units
> or
> import module
> units = module.units
>
> Any other usage should be qualified...
>
> something.units(...)
>
>
I think the hal interpretor hides all that from the user. I've since 
discovered the raspbian-10.1 repo has a "units" but I don't think its 
what hal is looking for when it encounters a "loadusr units" command in 
the config file, and apparently its a silent error. I've now installed 
the repo's version, and am rebuilding LinuxCNC right now just to see if 
it now finds it.
>
>   I'd suspect you have the "from m import f" form somewhere, in which
> case you now need to find out what has changed in module "m" that
> resulted in removing the function.
>
> NOTE: "from m import *" would not explicitly list it -- which means
> you need to compare any module using such a * import for changes from
> the version that used to work.
>
Sounds like not fun. :)

Thanks Dennis.
> --
>   Wulfraed Dennis Lee Bieber AF6VN
>   wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: upgrading python on raspbian

2019-10-14 Thread Gene Heskett
On Monday 14 October 2019 12:56:22 Gene Heskett wrote:

Continueing this thread, I now have a missing function by name, "units", 
that is preventing LinuxCNC from running.

Where in the python 3 world do I find that function?, which in this case 
controls what it is fed on to a pyvcp display according to a logic 
signal that tells it whether the machine is in inches mode, or mm mode?

Its in some of the gingerbread video code I do in the after postgui.hal 
file, that takes the number of degrees that the spindle has overshot the 
stop and reverse command due to the inertia of a 50 lb chuck, and 
converts that into either inches or mm's of carriage (z axis) 
overtravel, so I can subtract that when I am tapping a hole, and not 
subtracting it from the depth of threads I'm programming would run the 
tap into the bottom of the hole breaking it off in the hole.

Thats an expense no one needs. Not only is the tap broken, it takes a 
good part of a day to setup an EDM lashup and EDM the central core of 
tap out, leaving the teeth strips to be picked out of the hole with 
tweezers.  The hole is still tapped and won't be damaged, and a part 
that may cost hundreds of dollars is saved. But its far better to not 
make that mistake in the first place.  So where do I find a new "units"?

Thanks all.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: upgrading python on raspbian

2019-10-14 Thread Gene Heskett
On Monday 14 October 2019 12:00:42 Michael Torrie wrote:

> On 10/14/19 8:52 AM, Gene Heskett wrote:
> > I think thats the obvious path forward. Once ported, we don't have
> > to worry about that legacy stuff for two or 3 generations of linux.
>
> A worthy goal and I'm sure the LinuxCNC folk would be grateful for
> contributions.  Be aware that porting the python code is only half the
> problem, though. In order to make it work with Python 3, you'll have
> to also address the embedding issue. Python is interconnected with
> LinuxCNC through some generated bindings to C and also C++ code.  I'm
> not sure what they used for the C++ bindings, maybe boost?

I saw some of that go by in the latest builds. So I'm aware there is 
that, and some c++ being used here and there, but not how its all 
interconnected.

> There was 
> some discussion of this on the bug tracker and it looks like a fairly
> major undertaking.  See this year-old discussion:
> https://github.com/LinuxCNC/linuxcnc/issues/403
>
> Whatever you do, you probably will want to discuss it on the github
> issue tracker to make sure efforts aren't duplicated.

True too. But so far, I get the feeling progress has slowed because folks 
are busier than in years past. But I'm not the new blood they need, 
mines already 85 years old, but I currently have a machine dead in the 
water until I at least make it work for me.  I used a pi3 two years ago 
to run the machine, which it does that quite well but the video is best 
described as glacial. Now with buster we have 40x faster video, and I'm 
trying to upgrade to a pi4b in hopes of haveing something resembling 
realtime video. 1.7 fps from the pi3's framebuffer, just isn't "it".

At the instant, it appears our ability to control the spi drivers com 
speeds, has been lost in adding 2 or more new cards that Mesa has since 
developed at the same time its being adapted to run on either a pi3 or a 
pi4.  But that driver developer is a busy college prof 1/3rd of the way 
around this damp rock, so we're out of synch in our coms. Plus I'm also 
the care-giver for an injured and dying of COPD wife.  Not looking for 
sympathy, just saying.

Avoid getting old if you can, Michael, its not all its cracked up to be.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: upgrading python on raspbian

2019-10-14 Thread Michael Torrie
On 10/14/19 10:00 AM, Michael Torrie wrote:
> https://github.com/LinuxCNC/linuxcnc/issues/403
> 
> Whatever you do, you probably will want to discuss it on the github
> issue tracker to make sure efforts aren't duplicated.

Reading further, it appears that the binding and embedding python 3 has
been worked on and functions to a certain degree, which you probably
already knew.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: upgrading python on raspbian

2019-10-14 Thread Michael Torrie
On 10/14/19 8:52 AM, Gene Heskett wrote:
> I think thats the obvious path forward. Once ported, we don't have to 
> worry about that legacy stuff for two or 3 generations of linux. 

A worthy goal and I'm sure the LinuxCNC folk would be grateful for
contributions.  Be aware that porting the python code is only half the
problem, though. In order to make it work with Python 3, you'll have to
also address the embedding issue. Python is interconnected with LinuxCNC
through some generated bindings to C and also C++ code.  I'm not sure
what they used for the C++ bindings, maybe boost?  There was some
discussion of this on the bug tracker and it looks like a fairly major
undertaking.  See this year-old discussion:
https://github.com/LinuxCNC/linuxcnc/issues/403

Whatever you do, you probably will want to discuss it on the github
issue tracker to make sure efforts aren't duplicated.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: upgrading python on raspbian

2019-10-14 Thread Chris Angelico
On Tue, Oct 15, 2019 at 1:53 AM Gene Heskett  wrote:
>
> On Sunday 13 October 2019 16:22:33 Chris Angelico wrote:
> > My recommendation would be to start with "sudo apt build-dep
> > linuxcnc-uspace" and see if it can get any, but otherwise, just
> > replace "python-" with "python3-" and see if that works. You may need
> > to dig up dev packages of them though.
>
> The 2 packages that are missing right now are python-gtksourceview2, and
> python-vte.  Do they have python3 equ's? Finding python3 replacements
> for those 2 would take some pressure off its forward march.

Hmm. The GTK SourceView control has been a bit of a pain in previous
porting jobs. You may end up needing to build something from source.
Sorry :(

> > Another option may be to just use pip to install your dependencies.
> > That might work out easier.
>
> There seems to be an underground effort to throw pip and pip3 under the
> bus of late. I'm wonder why?
>

No idea. If you're talking about the way that "python3 -m pip install
..." is preferred over "pip3 install ...", then that's due to the
possibility of having multiple Pythons installed; but if you're using
a virtual environment, or you're confident you have full control over
your setup, you can just use the shorthand.

That's still using pip, though. Just not using /usr/local/bin/pip (or
equiv) to invoke it.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: upgrading python on raspbian

2019-10-14 Thread Gene Heskett
On Sunday 13 October 2019 16:22:33 Chris Angelico wrote:

> On Mon, Oct 14, 2019 at 6:38 AM Gene Heskett  
wrote:
> > I'm not a python expert by a long ways.
> >
> > I have built the linuxcnc-master, which is the development branch of
> > linuxcnc, a machine control program to run most metal carving
> > machines. Lathes, milling machines, anything you can motorize,
> > LinuxCNC can run.
> >
> > This requires a preempt-rt kernel which I've managed to build and
> > install, all on a pi-4b running raspbian buster, the armfh-v7l
> > version of debian 10.1.
> >
> > But linuxcnc is quite elderly code, some of it going back to before
> > there was a linux, so despite being actively developed right now for
> > x86 type hardware but has quite a list of missing dependencies I
> > cannot satisfy from the raspbian repos.
> >
> > They are:
> >
> > The following packages have unmet dependencies:
> >  linuxcnc-uspace : Depends: python2.7-glade2 but it is not
> > installable or
> >
> > Can anyone supply a list of python3 packages that will cover the
> > functions contained in the above list?, and I will attempt to edit
> > the linuxcnc srcs to use the more modern code base?
>
> So if I understand you correctly, you're not worried about actually
> supplying these apt packages, but you want equivalents so you can port
> the code itself to Py3?

I think thats the obvious path forward. Once ported, we don't have to 
worry about that legacy stuff for two or 3 generations of linux. I have 
it building on raspbian buster-10.1 for a rpi4b right now in "uspace" 
mode, but missing stuff has cost us a couple of the pretty gui-faces we 
use with it, and I'd like to find a way around that if I could.

> My recommendation would be to start with "sudo apt build-dep
> linuxcnc-uspace" and see if it can get any, but otherwise, just
> replace "python-" with "python3-" and see if that works. You may need
> to dig up dev packages of them though.

The 2 packages that are missing right now are python-gtksourceview2, and 
python-vte.  Do they have python3 equ's? Finding python3 replacements 
for those 2 would take some pressure off its forward march.

as far as build dep detection, dpkg-checkbuilddeps is as dumb as a rock. 
I've had to add at least ten packages now to get it to build, that were 
never detected by dpkg-checkbuilddeps. And its major stuff, like 
inkscape and imagemagick. checkbuilddeps is ok before a 1st build, 
finding 50 or so things it needed, but for major stuff, a waste of time 
after the first session.

> Another option may be to just use pip to install your dependencies.
> That might work out easier.

There seems to be an underground effort to throw pip and pip3 under the 
bus of late. I'm wonder why?

Thanks ChrisA.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: upgrading python on raspbian

2019-10-13 Thread Chris Angelico
On Mon, Oct 14, 2019 at 6:38 AM Gene Heskett  wrote:
>
> I'm not a python expert by a long ways.
>
> I have built the linuxcnc-master, which is the development branch of
> linuxcnc, a machine control program to run most metal carving machines.
> Lathes, milling machines, anything you can motorize, LinuxCNC can run.
>
> This requires a preempt-rt kernel which I've managed to build and
> install, all on a pi-4b running raspbian buster, the armfh-v7l version
> of debian 10.1.
>
> But linuxcnc is quite elderly code, some of it going back to before there
> was a linux, so despite being actively developed right now for x86 type
> hardware but has quite a list of missing dependencies I cannot satisfy
> from the raspbian repos.
>
> They are:
>
> The following packages have unmet dependencies:
>  linuxcnc-uspace : Depends: python2.7-glade2 but it is not installable or
>
> Can anyone supply a list of python3 packages that will cover the
> functions contained in the above list?, and I will attempt to edit the
> linuxcnc srcs to use the more modern code base?

So if I understand you correctly, you're not worried about actually
supplying these apt packages, but you want equivalents so you can port
the code itself to Py3?

My recommendation would be to start with "sudo apt build-dep
linuxcnc-uspace" and see if it can get any, but otherwise, just
replace "python-" with "python3-" and see if that works. You may need
to dig up dev packages of them though.

Another option may be to just use pip to install your dependencies.
That might work out easier.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


upgrading python on raspbian

2019-10-13 Thread Gene Heskett
I'm not a python expert by a long ways.

I have built the linuxcnc-master, which is the development branch of 
linuxcnc, a machine control program to run most metal carving machines.
Lathes, milling machines, anything you can motorize, LinuxCNC can run.
 
This requires a preempt-rt kernel which I've managed to build and 
install, all on a pi-4b running raspbian buster, the armfh-v7l version 
of debian 10.1.

But linuxcnc is quite elderly code, some of it going back to before there
was a linux, so despite being actively developed right now for x86 type
hardware but has quite a list of missing dependencies I cannot satisfy 
from the raspbian repos.

They are:

The following packages have unmet dependencies:
 linuxcnc-uspace : Depends: python2.7-glade2 but it is not installable or
python-glade2 but it is not going to be installed
   Depends: python-gtksourceview2 but it is not going to be 
installed
   Depends: python-vte but it is not installable
   Depends: python-gst0.10 but it is not installable
   Depends: python-xlib but it is not going to be installed
   Depends: python-gtkglext1 but it is not going to be installed
   Depends: python-configobj but it is not going to be installed
   Recommends: hostmot2-firmware-all but it is not installable

Can anyone supply a list of python3 packages that will cover the 
functions contained in the above list?, and I will attempt to edit the 
linuxcnc srcs to use the more modern code base?

Ignore the hostmot2-firmware-all package as its available, and may not 
be actually required with the interface card in actual use. It has its 
own fpga firmware already installed.

Thank you all.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list