[chirp_devel] [PATCH] [AnyTone 5888UV] Add simple squelch mode & additional file identifier and add extra channel attributes
James Berry
Sat Nov 21 12:35:32 PST 2020
Dan,
I had the same error and was able to run the tests on my driver like this:
C:\chirpdev>python tests/run_tests.py -d TYT_TH-UV88
Perhaps that will help someone else until tox works as designed 😉
From: chirp_devel-bounces at intrepid.danplanet.com <chirp_devel-bounces at intrepid.danplanet.com>
Date: Saturday, 21 November 2020 at 20:14
To: chirp_devel at intrepid.danplanet.com <chirp_devel at intrepid.danplanet.com>
Subject: Re: [chirp_devel] [PATCH] [AnyTone 5888UV] Add simple squelch mode & additional file identifier and add extra channel attributes
> 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?
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.
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.
--Dan
diff -r 3e2cf83e9483 setup.py
--- a/setup.py Fri Nov 20 17:15:58 2020 -0500
+++ b/setup.py Sat Nov 21 12:09:32 2020 -0800
@@ -105,7 +105,8 @@
from distutils.core import setup
from glob import glob
- os.system("make -C locale clean all")
+ if sys.platform != 'win32':
+ os.system("make -C locale clean all")
desktop_files = glob("share/*.desktop")
# form_files = glob("forms/*.x?l")
@@ -150,9 +151,9 @@
f.close()
-if sys.platform == "darwin":
+if sys.platform == "darwin" and 'TOX_ENV' not in os.environ:
macos_build()
-elif sys.platform == "win32":
+elif sys.platform == "win32" and 'TOX_ENV' not in os.environ:
win32_build()
else:
default_build()
diff -r 3e2cf83e9483 tox.ini
--- a/tox.ini Fri Nov 20 17:15:58 2020 -0500
+++ b/tox.ini Sat Nov 21 12:09:32 2020 -0800
@@ -7,6 +7,8 @@
passenv = HOME
whitelist_externals = bash
deps = future
+setenv =
+ TOX_ENV=yes
[testenv:unit]
deps =
_______________________________________________
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/20201121/12b7b7d4/attachment-0001.html
More information about the chirp_devel
mailing list