← Back to team overview

usf-team team mailing list archive

Re: setup.py + config.py update

 

Hi, well done!

I'm happy with the structural change as long as you make it works :)
as stated earlier, I was less than happy with my organisation ;) I
just did'nt manage to get a better one.

The setup.py thing is very good news :) it's more standard and will
help a lot, will try to test deb and rpm, as well as windows, as I
have a seven VM for that purpose (it's about the only purpose I see to
it).

If you can preserve compatibility on config as you stated, it would be
a good thing, but if not possible, let's just embrace change ;).
>    config = config.general
one less ugly way to do that is "import config.general as config" in
modules using config. But we will see what fits better, depending on
what you come up with as a final implementation :).

Regards :)

2010/1/27 Edwin Marshall <aspidites@xxxxxxxxx>:
> 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
>
> _______________________________________________
> Mailing list: https://launchpad.net/~usf-team
> Post to     : usf-team@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~usf-team
> More help   : https://help.launchpad.net/ListHelp
>



References