Whyteboard doesn't automatically try to install wxpython (Patch)

Bug #674319 reported by Zack Buhman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Whyteboard
Triaged
Low
Zack Buhman
Wxpython Installer Script
In Progress
Critical
Zack Buhman

Bug Description

The idea is that you just start whyteboard (provided you have python 2.5 through 2.7 installed, which is common in most linux distributions, and easy for Windows people) and that it automatically installs wxpython if the user asks/agrees (because wxpython is less-common).

Operating Systems:

- Windows (Script run as administrator)
- MacOS - Incomplete
- Ubuntu "Gusty" through "Lucid"
- Debian Etch and Lenny
- openSUSE 11.1-11.3
- Fedora/Core 8-14; RHEL 5-6
- Gentoo (latest/head?)
- Mandriva "Rawhide"
- Slackware 11.3
- Arch - Pending
- FreeBSD - Pending
- Foresight/rPath - Pending
- Others would be easy to implement, if this bug is approved (and I'd be happy to work out bugs).

Package Managers (Linux):
- zypper
- yum
- apt-get
- emerge
- urpmi
- slackpkg/sbopkg
- pacman (pending)
- pkg_add (pending)
- conary (pending)

Processor:
- openSUSE: i586, x86_64
- Ubuntu: i386, amd64
- Gentoo: alpha, amd64, hppa, ia64, ppc, ppc64, sparc, and x86
- Slackware: x86
- i586/x86 in general is a good idea

GPU:
- Does whyteboard even use a GPU?

Python:
- Version 2.5 through 2.7
(Note 2.4 might work if it were enabled for dapper through intrepid as the corresponding wxpython package exists)

Wxpython:
- Windows: 2.8.11.0
- Mac: 2.8.11.0
- openSUSE: 2.8.11.0
- Ubuntu Feisty: 2.8.9.1
- Ubuntu Gusty: 2.8.9.2
- Ubuntu Hardy + Intrepid: 2.8.10.1
- Ubuntu Jaunty - Lucid: 2.8.11.0
- Debian Etch + Lenny: 2.8.11.0
- Fedora 8 - 10: 2.8.9.1
- Fedora 11 - 14: 2.8.11.0
- RHEL 5 + 6: 2.8.11.0
- Gentoo ?: 2.8.10.1
- Mandriva "Rawhide?": 2.8.9.2
- Slackware 13.1: 2.8.11.0

Tags: future

Related branches

Revision history for this message
Zack Buhman (zbuhman) wrote :
Revision history for this message
Zack Buhman (zbuhman) wrote :

Updated patch: A little smarter and cleaned code (more intelligent usage of diff)

Changed in whyteboard:
assignee: nobody → Zack Buhman (zbuhman)
Revision history for this message
Steven Sproat (sproaty) wrote :

cool, I'll try and check it out when I have time, I've not really been in the "mood" for programming after being in work all day, programming.

Thanks though, looks interesting!

Zack Buhman (zbuhman)
description: updated
Revision history for this message
Zack Buhman (zbuhman) wrote :

Updated: Added support for Gentoo, Fedora, RHEL, and Mandriva; added generic installer for people running derivatives so that they can select what package manager they use (if the user actually knows, problem is, the targeted user probably wouldn't).

Revision history for this message
Zack Buhman (zbuhman) wrote :

Updated how dependency checker handles input -- much cleaner and more resistant to user-input errors. Still may be some glaring bugs (just compiling in my head how this all rolls together and testing little bits in the interactive interpreter at this point); I'll test this on Debian tomorrow probably.

Revision history for this message
Zack Buhman (zbuhman) wrote :

Bug fixes (some caused by incomplete refactoring a few patches ago), added Slackware support.

Zack Buhman (zbuhman)
description: updated
Steven Sproat (sproaty)
Changed in whyteboard:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Zack Buhman (zbuhman) wrote :

Fixed a bug in the ...(gasp)... Windows installer (a silly but severe one) where I simply forgot I wanted subprocess.call instead of Popen (so it would try to install wxpython while still downloading it, only works if you already have it in the download folder (like me)).

Also allowed attempted installation (Might do a little md5 on the installer tomorrow + forcing installation (md5 doesn't match for whatever reason) + download resuming) if file is already present.

Elevates to administrator if necessary. Found a cross platform solution with 0.1 seconds of google, the rest of the script will get smarter about the excessive blind su requests. (will use a little clever VBS script (to automate secondary logon) I saw on the interweb ages ago to help out with that when I write an ugly GUI with Tk for this (or would that be against whyteboard doctrine?) with the option to revert back to the original [Y/N] dialogs.)

I suppose we could promote this (at least the Windows, Ubuntu, Fedora, and openSUSE sections) from "pre-alpha" to
"alpha-quality" software at this point (well, until I find the next show-stopping bug just like I did today).

Minor Changes (only .7 KB inflation, and that's mainly a string reminding me how to detect administrative privileges cross-platform).

Pastebin for non-patch format: dependency.py: http://paste.pocoo.org/show/296124/ (whyteboard.py binding starts on line 380 or so)

Zack Buhman (zbuhman)
Changed in whyteboard:
status: Confirmed → In Progress
Revision history for this message
Steven Sproat (sproaty) wrote :

Cool. What show stopping bug, by the way?

Zack Buhman (zbuhman)
Changed in wxpythoninstall:
assignee: nobody → Zack Buhman (zbuhman)
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Zack Buhman (zbuhman) wrote :

Heh, actually, I re-read what I wrote, and I did actually want Popen. The problem was that I had been testing code, but I'm running on metered internet (cell-phone) and can't afford to re-download wxpython repeatedly. So I had been disabling bits of code to make other portions work (reverted back to Popen in the current code).

It's obvious what I was trying to do but didn't realize that late in the evening. On line 154 I say run = False for that next while run: loop on 155. That loop is designed to handle Popen (prevent it from continuing). The idea (which is going to be implemented tomorrow probably--yes, I'm going to import threading and subprocess in the same application/"bug"-- reminds me when I was told in #python that any code that does that probably isn't very well done (ok, it was multiprocessing and threading concurrently, actually...)) is/was to make it easy to multi-thread downloading for multiple files (why? I don't know...). With my new class system in the current code though, it'll be twice as easy (all of the downloader managers inherit a "GenericDownloader" class).

With both run = False and subprocess.Popen, wget would be called, and while wget is probably not even started yet, and it'd be a race to see whether python tries to open wxpython before wget creates it (either way, whether the file is 0% or 0.1% downloaded, something bad would happen). call() would have been equivalent had I not specified subprocess.PIPE for stdin and out--rather that that did *fix* the issue, but wget would have not displayed any output (you're supposed to use subprocess.Popen.communicate() with subprocess.PIPE).

Anyway, Refactorization is in progress... probably will only get the windows portion overhauled tonight, depends on the ratio between time-spent-on-eclipse/time-spent-on-launchpad ;)

Revision history for this message
Zack Buhman (zbuhman) wrote :

Finished refactoring, courtesy of Pydev's pylint integration, Gatorade, and, most of all, Basshunter; I think I made a few regressions on the Linux side. Added Arch Linux support, by the way, like I promised awhile ago (the other two look damn near impossible to implement, but then again, people using those probably know what the hell they're doing and probably don't need this script anyway).

Enormous bloat, I think the size nearly doubled from the last patch.

Not much changed on the Linux installer, just made it neater.

The Windows installer expanded so much it's pretty daunting to manipulate now (probably should refactor again), just got through a pretty long runtime-logic bug-smashing session. Throughout the code, I placed # TODO's and # FIXME's everywhere, I think there's about 35 different things I have planned to do to this yet.

Revision history for this message
Zack Buhman (zbuhman) wrote :

By the way, would wxpython 2.9.x and python 2.7 work with whyteboard? (or is that something I need to test myself ;) ?)

Revision history for this message
Steven Sproat (sproaty) wrote :

Nah it uses specific features that were added in 2.8.9.something.

I've yet to look over all this code because I'm just constantly tired and am never in the right mindset to do some coding at home, but I appreciate all the changes.

Revision history for this message
Zack Buhman (zbuhman) wrote :

I meant 2.9.x (the newest release); do you happen to know if that breaks anything from 2.8.x?

Revision history for this message
Steven Sproat (sproaty) wrote :

oh sorry, totally misread your comment :)

I did install it the latest wx at home (Python 2.6) and noticed a few oddities - can't recall what, from the top of my head. Pydev runs using wx 2.8.x so everything's been alright.

Steven Sproat (sproaty)
tags: added: future
Steven Sproat (sproaty)
Changed in whyteboard:
status: In Progress → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.