From 7b9b0f884b73e2a0e1ed5886dcfca1def2f67805 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Tue, 17 Apr 2018 20:03:19 -0700 Subject: [PATCH] Add batch file for windows as a trampoline for the actual script The installation does not work unless pywin32 is already installed. See: https://github.com/mhammond/pywin32/issues/1197 --- tools/odrivetool.bat | 2 ++ tools/setup.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 tools/odrivetool.bat diff --git a/tools/odrivetool.bat b/tools/odrivetool.bat new file mode 100644 index 00000000..765e31cb --- /dev/null +++ b/tools/odrivetool.bat @@ -0,0 +1,2 @@ +@echo off +python %~dp0\odrivetool \ No newline at end of file diff --git a/tools/setup.py b/tools/setup.py index a7ac5980..85ddd5cd 100644 --- a/tools/setup.py +++ b/tools/setup.py @@ -68,7 +68,7 @@ if not creating_package: setup( name = 'odrive', packages = ['odrive', 'odrive.dfuse'], # this must be the same as the name above - scripts = ['odrivetool', 'odrive_demo.py'], + scripts = ['odrivetool', 'odrivetool.bat', 'odrive_demo.py'], version = version, description = 'Control utilities for the ODrive high performance motor controller', author = 'Oskar Weigl', @@ -81,7 +81,7 @@ setup( 'PySerial', # Required to access serial devices from Python 'IntelHex', # Used to by DFU to load firmware files 'matplotlib', # Required to run the liveplotter - 'pywin32 >= 1.0;platform_system=="Windows"' # Required for fancy terminal features on Windows + 'pywin32==222;platform_system=="Windows"' # Required for fancy terminal features on Windows ], package_data={'': ['version.txt']}, include_package_data=True,