[chirp_devel] [Patch] [Bug #1047] Proposed fixes for virtualenv support

Michael Pittaro
Wed Nov 27 06:18:30 PST 2013


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.

---------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_1047.patch
Type: text/x-patch
Size: 14535 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20131127/32347a2c/attachment-0001.bin 


More information about the chirp_devel mailing list