<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Dan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I had the same error and was able to run the tests on my driver like this:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">C:\chirpdev>python tests/run_tests.py -d TYT_TH-UV88<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Perhaps that will help someone else until tox works as designed
</span><span style="font-family:"Apple Color Emoji";mso-fareast-language:EN-US">😉</span><span style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">chirp_devel-bounces@intrepid.danplanet.com <chirp_devel-bounces@intrepid.danplanet.com><br>
<b>Date: </b>Saturday, 21 November 2020 at 20:14<br>
<b>To: </b>chirp_devel@intrepid.danplanet.com <chirp_devel@intrepid.danplanet.com><br>
<b>Subject: </b>Re: [chirp_devel] [PATCH] [AnyTone 5888UV] Add simple squelch mode & additional file identifier and add extra channel attributes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">> I'd like to be able to run tox, but on Windows it always errors on setup.py, line 5, "from chirp import CHIRP_VERSION" as below. This happens when testing as well. Any ideas?<br>
<br>
I don't have a windows development environment handy to play with this, so people that want this to work on windows are going to have to do a little to help with it.<br>
<br>
The problem is, I think, that setup.py doesn't really work for the 'sdist' target, which tox needs to build the package. This is totally untested, but try this (or a similar) hack to make it run the normal build stuff in setup.py if inside tox. I dunno if the
forward slash paths in the default_build() are going to be a problem on windows or if the libraries will translate those, so you might have to mess with that a bit.<br>
<br>
--Dan<br>
<br>
<br>
diff -r 3e2cf83e9483 setup.py<br>
--- a/setup.py Fri Nov 20 17:15:58 2020 -0500<br>
+++ b/setup.py Sat Nov 21 12:09:32 2020 -0800<br>
@@ -105,7 +105,8 @@<br>
from distutils.core import setup<br>
from glob import glob<br>
<br>
- os.system("make -C locale clean all")<br>
+ if sys.platform != 'win32':<br>
+ os.system("make -C locale clean all")<br>
<br>
desktop_files = glob("share/*.desktop")<br>
# form_files = glob("forms/*.x?l")<br>
@@ -150,9 +151,9 @@<br>
f.close()<br>
<br>
<br>
-if sys.platform == "darwin":<br>
+if sys.platform == "darwin" and 'TOX_ENV' not in os.environ:<br>
macos_build()<br>
-elif sys.platform == "win32":<br>
+elif sys.platform == "win32" and 'TOX_ENV' not in os.environ:<br>
win32_build()<br>
else:<br>
default_build()<br>
diff -r 3e2cf83e9483 tox.ini<br>
--- a/tox.ini Fri Nov 20 17:15:58 2020 -0500<br>
+++ b/tox.ini Sat Nov 21 12:09:32 2020 -0800<br>
@@ -7,6 +7,8 @@<br>
passenv = HOME<br>
whitelist_externals = bash<br>
deps = future<br>
+setenv =<br>
+ TOX_ENV=yes<br>
<br>
[testenv:unit]<br>
deps =<br>
<br>
_______________________________________________<br>
chirp_devel mailing list<br>
chirp_devel@intrepid.danplanet.com<br>
<a href="http://intrepid.danplanet.com/mailman/listinfo/chirp_devel">http://intrepid.danplanet.com/mailman/listinfo/chirp_devel</a><br>
Developer docs: <a href="http://chirp.danplanet.com/projects/chirp/wiki/Developers">
http://chirp.danplanet.com/projects/chirp/wiki/Developers</a><o:p></o:p></p>
</div>
</div>
</body>
</html>