Codebase list python-procrunner / df68a3b
don't try installing win32api on Python 3.4 Markus Gerstel 5 years ago
3 changed file(s) with 13 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
88 by default. This causes procrunner to call the Win32 API FindExecutable()
99 function to try and lookup non-.exe files with the corresponding name. This
1010 means .bat/.cmd/etc.. files can now be run without explicitly specifying
11 their extension.
11 their extension. Only supported on Python 2.7 and 3.5+.
1212
1313 0.4.0 (2018-04-23)
1414 ------------------
268268 if win32resolve and sys.platform == 'win32':
269269 try:
270270 import win32api
271 _, found_executable = win32api.FindExecutable(command[0])
272 logger.debug("Resolved %s as %s", command[0], found_executable)
273 command[0] = found_executable
274271 except ImportError:
275 logger.warn("Could not resolve executable name: package win32api missing")
272 win32api = None
273 if (2, 8) < sys.version_info < (3, 5):
274 logger.info("Resolving executable names only supported on Python 2.7 and 3.5+")
275 else:
276 logger.warn("Could not resolve executable name: package win32api missing")
277 try:
278 if win32api:
279 _, found_executable = win32api.FindExecutable(command[0])
280 logger.debug("Resolved %s as %s", command[0], found_executable)
281 command[0] = found_executable
276282 except Exception as e:
277283 if not hasattr(e, 'winerror'): raise
278284 logger.warn("Error trying to resolve the executable: %s", getattr(e, 'strerror', str(e)))
1010 history = history_file.read()
1111
1212 requirements = ['six']
13 if sys.platform == 'win32':
13 if sys.platform == 'win32' and not ((2, 8) < sys.version_info < (3, 5)):
14 # PyWin32 is only supported on 2.7 and 3.5+
1415 requirements.append('pywin32')
1516
1617 setup_requirements = ['pytest-runner', 'six']