Re: [jokosher-devel] setup.py - real installation



Daniel Holbach a écrit :
Hellas,

Michael Vogt and I had a go at setup.py and tried to make jokosher run
happily locally, but also installed with  sudo ./setup.py

Here's the result from a quick hack session. Please review it and see if
it makes sense.

Packaging should be *really* easy now.

Have a nice day,
 Daniel



------------------------------------------------------------------------

diff -ruN trunk/Jokosher/AddInstrumentDialog.py jokosher/Jokosher/AddInstrumentDialog.py
--- trunk/Jokosher/AddInstrumentDialog.py	2006-08-25 01:58:13.000000000 +0200
+++ jokosher/Jokosher/AddInstrumentDialog.py	2006-08-25 15:59:44.000000000 +0200
@@ -135,14 +135,11 @@
 	if len(instrumentPropertyList) > 0:
 		return
 		
-	basepath = os.path.dirname(os.path.abspath(__file__))
-	instrpath = os.path.join(basepath, "..", "Instruments")
-	
-	files = os.walk(instrpath).next()[2]
+	files = os.walk(Globals.INSTR_PATH).next()[2]

This would be nice wouldn't it. Just import Globals from AddInstrumentDialog.py and use the IMAGE_PATH. However to prevent the gui from freezing and to speed up loading, this function is on an gobject.idle_add. This means it may be called *before* Globals.SetAbsPaths() is called, and the IMAGE_PATH will not have been initialized.

I'll see what I can do to fix this problem so that the images are only ever imported after the paths have been set.

Laszlo



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]