usf-team team mailing list archive
-
usf-team team
-
Mailing list archive
-
Message #00012
setup.py + config.py update
setup.py
I pretty much finished writing this script this evening. It is now (potentially) possible to create packages for all major platforms. I have already tested source packages (tar.gz, zip, etc) and 'setup.py --install' on my linux box, and all files are installed correctly. What remains to be tested/developed is rpm packages, deb packages, self-extracting exe, and dmg images for Mac OS X.
By the way, to help facilitate distribution, I finally implemented the directory restructuring that I had commented on earlier. If you are interested, browse my branch online. A summary of the changes I made can be viewed in the README.txt file. I would highly recommend NOT branching my repo because, as the status indicates, it is very unstable. I hope to tidy up all the lose ends before the end of tomorrow.
config.py
The first iteration of the new config module is complete. I say first iteration, because while it does offer a few benefits over the old module, I'm not yet happy with it. With the exception of seuqences.cfg (I'm still trying to figure that one out), all configuration has been moved to a single config.ini with sections marking what used to be separate files (general, audio, controls, etc). A side effect of this change, is that operations tend to be a bit more lengthy than they used to be:
config['THEME'] = 'tech' # old way
config.set('general', 'THEME', 'tech') # new way
As such, on the next iteration, I'll be wrapping ConfigParser's API so that something like this can be done:
config.general['THEME'] = 'tech'
In fact, with just a single line, presumably at the top of the script, this would allow for backwards compatibility:
config = config.general
config['THEME'] = 'tech'
If only I had thought of that during the first iteration...
Well, that's it for now. What do you guys think?
Regards,
aspidites
Follow ups