[chirp_devel] [Patch] [Bug #1047] Proposed fixes for virtualenv support
This is a first pass of my proposed patch to support python virtual env's.
I don't think this is ready for a commit yet, but wanted to get some initial feedback and possibly additional testing from any mac developers.
I have been able to test under Linux and Windows XP and everything works. I tested command line installs, running directly from the source tree, and installing the windows executable version. However, I have not tested on a mac yet, since I don't have a PyToApp setup.
There's a summary of the changes in the commit message, and below.
My testing path has been: - run the tests in platform.py manually and verify the paths. - run chirp - verify a stock config can be opened - verify a radio image can be opened - switch languages and verify that works - check the icon
mike KJ6VCP
--------------------------------------------------- Feature #1047: Chirp support for Python virtualenv's
This change adds support for virtualenv's to Chirp.
The bulk of the changes involve updating the platform classes to reliably determine the location of the runtime directories for locales, pixmaps, xml schemas, and the stock configs. The other changes are updates to use the new platform class functions, and to remove some absolute paths.
Technically, these changes aren't virtualenv specific - they just make Chirp more 'location aware', so virtualenv's can be used.
Change summary:
chirp/platform.py
1. adds five new functions to return runtime directories - locale_dir(), share_dir(), stock_configs_dir(), pixmaps_dir(), schema_dir()
2. updates the logic to determine the runtime locations of the runtime directories.
3. adds tests for the new functions.
chirpui/mainapp.py
1. updated to use the new platform functions for the stock_configs_dir and the pixmaps_dir.
chirp/generic_xml.py
1. updated to use the new platform function for the schema_dir (xml schema files)
chirpw
1. updated to use the #!/usr/bin/env idiom, so it picks up python from the path instead of a hard coded location.
setup.py
1. change the rpttool path to relative instead of absolute.
---------------------------
I don't think this is ready for a commit yet, but wanted to get some initial feedback and possibly additional testing from any mac developers.
I just want to make sure we get an ack from someone on each of:
1. Linux, straight from the source tree and tarball 2. Linux, using a deb 3. Windows, straight from the source tree 4. Windows, from the .exe 5. Mac straight from the source tree 6. Mac, from the .app
2, 4, and 6 are probably things we'll probably just have to check the day after this lands. The others can be checked ahead of time.
Jim, can you make sure that #3 works for you? #1 seems okay to me.
--Dan
participants (2)
-
Dan Smith
-
Michael Pittaro