Build the zip file¶
How to set up a build environment on a Windows machine:
Install Python : Go to https://www.python.org/downloads/windows/ and select “Latest Python 3 Release”. Choose “Windows x86 executable installer” (or -64) and run it as usual with default installation options.
Install SWIG : Go to http://www.swig.org/download.html and follow the instructions.
Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools
pip install -e eidreader
pip install pyinstaller
We don’t recommend to use pipenv because it doesn’t support -e switch for install.
When your build environment is set up, here is how to create a distribution file:
i
pyinstaller --noconsole eidreader/scripts/eidreader
cd dist
python -m zipfile -c eidreader.zip eidreader
This creates a file eidreader.zip
in your dist folder.
Troubleshooting¶
Here is a collection of problems reported by Windows users:
error: command ‘swig.exe’ failed: No such file or directory
After downloading the
swigwin-3.0.12.zip
file you must unpack it. Did you do that? Use your Windows Explorer to find the fileswig.exe
. What is the full name of the folder containing this file? (for exampleC:\swigwin-3.0.12
).Check your
PATH
environment variable (somewhere in your system settings). The valu of this variable usually contains a long text of styleC:\Windows\;C:\Some\Other
. It is a list of folders where Windows should search for programs. Got to the end of that value and add;C:\swigwin-3.0.12
(don’t forget the semicolon “;” which is the separator between folders).After changing your
PATH
variable you must open a new command prompt window.