From cabb4e00ca5bc7bec4f7dad531baac49d7969236 Mon Sep 17 00:00:00 2001 From: Taka Date: Thu, 4 May 2017 07:24:51 +0000 Subject: [PATCH] Added a check to the build script for Windows+virtualenv. --- _freeze.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_freeze.py b/_freeze.py index a1643c1..2b45c38 100755 --- a/_freeze.py +++ b/_freeze.py @@ -66,6 +66,10 @@ build_options = { "include_files": get_extra_files() , } +# cx-freeze doesn't work in a virtualenv on Windows :-/ +if sys.platform == "win32" and os.getenv("VIRTUAL_ENV") : + raise RuntimeError( "Can't freeze on Windows in a virtualenv." ) + # freeze the application # NOTE: It would be nice to be able to use py2exe to compile this for Windows (since it produces # a single EXE instead of the morass of files cx-freeze generates) but py2exe only works up to