globaleaks / APAF

Anonymous Python Application Framework
33 stars 15 forks source link

proposed new structure for run to avoid if platform hell #20

Closed mogui closed 12 years ago

mogui commented 12 years ago

I propose a different structure for the run.py (this is a suggestion, it could be done much better for sure), but separating the main running file between os, i think, is necessary. The main problem is how twisted reactor is imported and run, it only let you install one reactor. Also specific OSX code is needed throughout the run script to avoid IF hell i think this way could be better let me know how to refine this solution if you like it :)

also i've changed a line in setup.py
DATA_FILES = [join('datadir', 'config'), join('datadir', 'contrib'), join('datadir', 'services')]

for osx full dirs must be included in DATA_FILES to run correctly not an os.walk which will include separated files without dir structure

OT: i think I'll be better work on this branch and pull/request to this branch so you can safely test my changes without breaking master :P and when you think it will be ok merge it. is it OK?

mmaker commented 12 years ago

Sorry for being late, but during those days I improved the backend part of the panel . Mh, so DATA_FILES is platform dependent, too - that line didn't work on windows.

That's great, thanks; I'll see if the solution fits well in a few hours :)