Re: a new Linux install solution for Visual Python

Bruce Sherwood <[email protected]> Sat, 12 Oct 2013 10:12:32 -0600
Newsgroups gmane.comp.python.visualpython.user
Message-ID <CAFDG03h1v93Sz9a2u7WjN1a7qdOc2AwR0uMze_p3WPOqcRggJw@mail.gmail.com>
--===============5781791347722213566==
Content-Type: multipart/alternative; boundary=047d7b6d9fa29b8b8604e88d80d1

--047d7b6d9fa29b8b8604e88d80d1
Content-Type: text/plain; charset=UTF-8

It doesn't really matter whether you write to me or to the old mailing
list, since we're probably the only people viewing that mailing list.

I guess I muddied the waters by trying wxPython 2.9.5, which I think you
had mentioned. Like 2.9.4, it does require a patch, with I've included in
the VPython repository. See the updated INSTALL.txt file:

https://github.com/BruceSherwood/vpython-wx/blob/master/INSTALL.txt

I used 2.9.5 partly because it's now the version available at wxpython.org,
and I wanted to make sure VPython works with it. On 64-bit Ubuntu 12.04 I
didn't see your bug with 2.9.4 and I don't see it with 2.9.5. No one else
has reported your bug (which doesn't prove that they wouldn't see the bug
if they tried your example, of course).

I don't know anything about gmane but would be happy to make the
connection. How would I do that?

Bruce


On Sat, Oct 12, 2013 at 3:11 AM, pataphor <[email protected]> wrote:

> On 10/12/2013 07:37 AM, Bruce Sherwood wrote:
> > I did a fresh build from source of VPython 6.05 on Ubuntu 12.04, using
> > wxPython 2.9.5. The example programs opacity-test1.py and
> opacity-test4.py
> > run correctly (fully opaque), as expected. The only possible explanation
> > has to be the graphics driver, yet this explanation seems to be ruled out
> > by the box being opaque with VPython 5.12. ?????
>
> Thank you for testing my script. Since we're now on the public mailing
> list I'll just copy it here for those who are reading:
>
> """
> from visual import *
> import itertools
>
> scene.range = 3
> scene.background = .5,.5,.5
> scene.forward = 1,-1,-1
>
> A,B,C,D,E,F,G,H = itertools.product([-1,1],[-1,1],[-1,1])
>
> data ={(A,B,D,A,D,C) : color.red, (A,C,G,A,G,E) : color.green,
>              (A,E,F,A,F,B) : color.blue, (H,G,C,H,C,D) : color.white,
>              (H,D,B,H,B,F) : color.yellow, (H,F,E,H,E,G) : color.orange}
>
> for P,C in data.items():
>      faces(pos = P, color = C, normal = [1,1,1])
>
> sphere(color = color.yellow, radius = .5, normal = [1,1,1])
> """
>
> On my vPython 6.5 installation this results in the sphere being visible
> even if it is completely inside the colored box.
>
> Another possible explanation, apart from your idea that this could be
> caused by my graphic drivers, is I built it with wxPython 2.9.4.0, with
> the patch that can be found here:
>
> http://sourceforge.net/projects/wxpython/files/wxPython/2.9.4.0/
>
> While you built it with wxPython 2.9.5.0, which doesn't seem to need a
> patch.
>
> So I tried downloading the new version, and built wxPython 2.9.5.0 with
> the command:
>
> sudo python2.7 build-wxpython.py --build_dir=../bld
>
> and this succeeded.
>
> However, when I next tried to install wxPython 2.9.5.0 with the command:
>
> sudo python2.7 build-wxpython.py --build_dir=../bld --install
>
> This fails with a python traceback. (this same command succeeded in the
> corresponding wxPython 2.9.4.0 directory)
>
> After inspecting the relevant parts of the the traceback:
>
> Traceback (most recent call last):
>    File "build-wxpython.py", line 378, in <module>
>      wxbuild.main(wxscript, build_options)
>    File
> "/home/xxxx/src/wxPython-src-2.9.5.0/build/tools/build-wxwidgets.py",
> line 485, in main
>      wxBuilder.install(dir=buildDir, options=extra)
>    File "/home/xxxx/src/wxPython-src-2.9.5.0/build/tools/builder.py",
> line 134, in install
>      args.extend(options)
> TypeError: 'NoneType' object is not iterable
>
> and looking this up in the referenced python file build-wxwidgets.py
> I see this code around line 485:
>
>      if options.install:
>          extra=None
>          if installDir:
>              extra = ['DESTDIR='+installDir]
>          wxBuilder.install(dir=buildDir, options=extra)
>
> it seems that if installDir is false (and the empty string is false in
> python!), extra remains to be None.
>
> This seems to be a bug in wxPython 2.9.5.0, or maybe there is something
> wrong with my system. I tried to get feedback about this on freenode IRC
> in the wxPython channel but there was no one active at that time.
>
> Then I looked up the wxPython user group on gmane. Incidentally, I
> noticed that even though they are using google groups, they still are
> synced to gmane. Maybe this is also a good idea for the vPython user group?
>
> Meanwhile, I have two other options for exploring this possibility, that
> the opacity difference could be caused by different wxPython versions,
> one is to subscribe to the wxPython mailing list/google groups/gmane
> interface and ask about the possible bug in wxPython there, and the
> other is to just look at my list of installed files from 2.9.4.0 and
> copy over the corresponding files from 2.9.5.0 manually.
>
> I'm curious about whether you also had this traceback, and if not, why not?
>
> P.
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> Visualpython-users mailing list
> Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/visualpython-users
>

--047d7b6d9fa29b8b8604e88d80d1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">It doesn&#39;t really matter whether you write to me or to=
 the old mailing list, since we&#39;re probably the only people viewing tha=
t mailing list.<div><br></div><div>I guess I muddied the waters by trying w=
xPython 2.9.5, which I think you had mentioned. Like 2.9.4, it does require=
 a patch, with I&#39;ve included in the VPython repository. See the updated=
 INSTALL.txt file:<br>
<div><br></div><div><a href=3D"https://github.com/BruceSherwood/vpython-wx/=
blob/master/INSTALL.txt">https://github.com/BruceSherwood/vpython-wx/blob/m=
aster/INSTALL.txt</a><br></div></div><div><br></div><div>I used 2.9.5 partl=
y because it&#39;s now the version available at <a href=3D"http://wxpython.=
org">wxpython.org</a>, and I wanted to make sure VPython works with it. On =
64-bit Ubuntu 12.04 I didn&#39;t see your bug with 2.9.4 and I don&#39;t se=
e it with 2.9.5. No one else has reported your bug (which doesn&#39;t prove=
 that they wouldn&#39;t see the bug if they tried your example, of course).=
</div>
<div><br></div><div>I don&#39;t know anything about gmane but would be happ=
y to make the connection. How would I do that?</div><div><br></div><div>Bru=
ce</div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote"=
>
On Sat, Oct 12, 2013 at 3:11 AM, pataphor <span dir=3D"ltr">&lt;<a href=3D"=
mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt;</sp=
an> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex">
<div class=3D"HOEnZb"><div class=3D"h5">On 10/12/2013 07:37 AM, Bruce Sherw=
ood wrote:<br>
&gt; I did a fresh build from source of VPython 6.05 on Ubuntu 12.04, using=
<br>
&gt; wxPython 2.9.5. The example programs opacity-test1.py and opacity-test=
4.py<br>
&gt; run correctly (fully opaque), as expected. The only possible explanati=
on<br>
&gt; has to be the graphics driver, yet this explanation seems to be ruled =
out<br>
&gt; by the box being opaque with VPython 5.12. ?????<br>
<br>
</div></div>Thank you for testing my script. Since we&#39;re now on the pub=
lic mailing<br>
list I&#39;ll just copy it here for those who are reading:<br>
<br>
&quot;&quot;&quot;<br>
from visual import *<br>
import itertools<br>
<br>
scene.range =3D 3<br>
scene.background =3D .5,.5,.5<br>
scene.forward =3D 1,-1,-1<br>
<br>
A,B,C,D,E,F,G,H =3D itertools.product([-1,1],[-1,1],[-1,1])<br>
<br>
data =3D{(A,B,D,A,D,C) : color.red, (A,C,G,A,G,E) : color.green,<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(A,E,F,A,F,B) : color.blue,=
 (H,G,C,H,C,D) : color.white,<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(H,D,B,H,B,F) : color.yello=
w, (H,F,E,H,E,G) : color.orange}<br>
<br>
for P,C in data.items():<br>
=C2=A0 =C2=A0 =C2=A0faces(pos =3D P, color =3D C, normal =3D [1,1,1])<br>
<br>
sphere(color =3D color.yellow, radius =3D .5, normal =3D [1,1,1])<br>
&quot;&quot;&quot;<br>
<br>
On my vPython 6.5 installation this results in the sphere being visible<br>
even if it is completely inside the colored box.<br>
<br>
Another possible explanation, apart from your idea that this could be<br>
caused by my graphic drivers, is I built it with wxPython 2.9.4.0, with<br>
the patch that can be found here:<br>
<br>
<a href=3D"http://sourceforge.net/projects/wxpython/files/wxPython/2.9.4.0/=
" target=3D"_blank">http://sourceforge.net/projects/wxpython/files/wxPython=
/2.9.4.0/</a><br>
<br>
While you built it with wxPython 2.9.5.0, which doesn&#39;t seem to need a<=
br>
patch.<br>
<br>
So I tried downloading the new version, and built wxPython 2.9.5.0 with<br>
the command:<br>
<br>
sudo python2.7 build-wxpython.py --build_dir=3D../bld<br>
<br>
and this succeeded.<br>
<br>
However, when I next tried to install wxPython 2.9.5.0 with the command:<br=
>
<br>
sudo python2.7 build-wxpython.py --build_dir=3D../bld --install<br>
<br>
This fails with a python traceback. (this same command succeeded in the<br>
corresponding wxPython 2.9.4.0 directory)<br>
<br>
After inspecting the relevant parts of the the traceback:<br>
<br>
Traceback (most recent call last):<br>
=C2=A0 =C2=A0File &quot;build-wxpython.py&quot;, line 378, in &lt;module&gt=
;<br>
=C2=A0 =C2=A0 =C2=A0wxbuild.main(wxscript, build_options)<br>
=C2=A0 =C2=A0File<br>
&quot;/home/xxxx/src/wxPython-src-2.9.5.0/build/tools/build-wxwidgets.py&qu=
ot;,<br>
line 485, in main<br>
=C2=A0 =C2=A0 =C2=A0wxBuilder.install(dir=3DbuildDir, options=3Dextra)<br>
=C2=A0 =C2=A0File &quot;/home/xxxx/src/wxPython-src-2.9.5.0/build/tools/bui=
lder.py&quot;,<br>
line 134, in install<br>
=C2=A0 =C2=A0 =C2=A0args.extend(options)<br>
TypeError: &#39;NoneType&#39; object is not iterable<br>
<br>
and looking this up in the referenced python file build-wxwidgets.py<br>
I see this code around line 485:<br>
<br>
=C2=A0 =C2=A0 =C2=A0if options.install:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0extra=3DNone<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if installDir:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0extra =3D [&#39;DESTDIR=3D&=
#39;+installDir]<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0wxBuilder.install(dir=3DbuildDir, options=
=3Dextra)<br>
<br>
it seems that if installDir is false (and the empty string is false in<br>
python!), extra remains to be None.<br>
<br>
This seems to be a bug in wxPython 2.9.5.0, or maybe there is something<br>
wrong with my system. I tried to get feedback about this on freenode IRC<br=
>
in the wxPython channel but there was no one active at that time.<br>
<br>
Then I looked up the wxPython user group on gmane. Incidentally, I<br>
noticed that even though they are using google groups, they still are<br>
synced to gmane. Maybe this is also a good idea for the vPython user group?=
<br>
<br>
Meanwhile, I have two other options for exploring this possibility, that<br=
>
the opacity difference could be caused by different wxPython versions,<br>
one is to subscribe to the wxPython mailing list/google groups/gmane<br>
interface and ask about the possible bug in wxPython there, and the<br>
other is to just look at my list of installed files from 2.9.4.0 and<br>
copy over the corresponding files from 2.9.5.0 manually.<br>
<br>
I&#39;m curious about whether you also had this traceback, and if not, why =
not?<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
P.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
---------------------------------------------------------------------------=
---<br>
October Webinars: Code for Performance<br>
Free Intel webinars can help you accelerate application performance.<br>
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most fr=
om<br>
the latest Intel processors and coprocessors. See abstracts and register &g=
t;<br>
<a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D60134071&amp;iu=
=3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.doubleclick.net/gam=
pad/clk?id=3D60134071&amp;iu=3D/4140/ostg.clktrk</a><br>
_______________________________________________<br>
Visualpython-users mailing list<br>
<a href=3D"mailto:Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org">Visualpython-us=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/visualpython-users"=
 target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/visualpytho=
n-users</a><br>
</div></div></blockquote></div><br></div>

--047d7b6d9fa29b8b8604e88d80d1--


--===============5781791347722213566==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
--===============5781791347722213566==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Visualpython-users mailing list
Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/visualpython-users

--===============5781791347722213566==--