[chirp_devel] run_tests: No module named serial
Jens J.
Fri Apr 11 22:35:20 PDT 2014
This should only really affect folks who have checked out the source via mercurial, so chances are high that they are developer types, who would hopefully have a clue what this means.
Besides all of that, we should probably add a Mac Developers page with this stuff on it. There is one for win32 which goes through similar prerequisites.
-J
________________________________
From: "chirp.cordless at xoxy.net" <chirp.cordless at xoxy.net>
To: chirp_devel at intrepid.danplanet.com
Sent: Friday, April 11, 2014 11:11 PM
Subject: Re: [chirp_devel] run_tests: No module named serial
Tom,
Well, that doesn't really fix any problem I have, or had.
Creating and using an alias for kk7ds python is all that's necessary
to run the run_tests script. But you have to recognize that that's the
fix for "No module named serial".
Making the script run automagically by requiring it be the first
python found in your search path doesn't help with identifying
the problem when you see the error message, it just adds another
level of obscurity. And it's possible that some user may not want
kk7ds python first in their path.
I'm personally ok with the status quo; I'm unlikely to see
"No module named serial" and not know the solution - now.
I'm willing to do the try/exept patch I suggested a couple of days
ago, because it makes that connection, and would help the next
newbie developer who trips over it. Let me know if that's wanted.
-dan
On Apr 10, 2014, at 11:01 AM, Tom Hayward - esarfl at gmail.com wrote:
> On Wed, Apr 9, 2014 at 4:48 PM, Tom Hayward <esarfl at gmail.com> wrote:
>> Sorry I don't have the time to focus on this right now, but here's another hint:
>> http://stackoverflow.com/questions/2429511/why-do-people-write-usr-bin-env-python-on-the-first-line-of-a-python-script
>>
>> Notice that this is *not* how Dan calls Python from run_tests. You
>> might fix it and submit it as your first bug fix :-)
>>
>> Tom KD7LXL
>
> Okay, here's what I was hinting but didn't have a chance to type up yesterday:
>
> Add kk7ds python to your path:
>
> PATH=/opt/kk7ds/bin/python:$PATH
>
>
> Then fix the script so that it runs the first "python" found in your path:
>
> diff -r fa9439f41b37 tests/run_tests
> --- a/tests/run_tests Wed Mar 19 10:38:45 2014 -0700
> +++ b/tests/run_tests Thu Apr 10 10:15:04 2014 -0700
> @@ -1,4 +1,4 @@
> -#!/usr/bin/python
> +#!/usr/bin/env python
> #
> # Copyright 2011 Dan Smith <dsmith at danplanet.com>
> #
>
> Now your system will choose the first "python" found in your PATH,
> which now is kk7ds python, which includes all the libraries Chirp
> requires.
>
> Tom KD7LXL
> _______________________________________________
> chirp_devel mailing list
> chirp_devel at intrepid.danplanet.com
> http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
> Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
>
_______________________________________________
chirp_devel mailing list
chirp_devel at intrepid.danplanet.com
http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20140411/46ff4900/attachment-0001.html
More information about the chirp_devel
mailing list