[chirp_devel] [PATCH] [AnyTone 5888UV] Add simple squelch mode & additional file identifier and add extra channel attributes
Dan Smith
Sat Nov 21 12:14:10 PST 2020
> 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 =
More information about the chirp_devel
mailing list