Our spec files have always created a VersionInfo struct on the fly and passed that as the value for 'version' to the EXE:
>>> from install.pi_utils import create_version_info
>>> version_info = create_version_info(exe_name, prod_name='JobScheduler')
>>>
>>> exe = EXE(
>>> ...
>>> version = version_info,
.>>> ...
>>> )
But in 3.5 that appears to be disallowed by the check in api.py at line 427, which is specifically requiring a path.
File "install\jobScheduler.spec", line 67, in <module>
version = version_info,
File "C:\PROGRA~1\Python37\lib\site-packages\PyInstaller\building\api.py", line 427, in __init__
if not os.path.isabs(self.versrsrc):
File "C:\PROGRA~1\Python37\lib\ntpath.py", line 69, in isabs
s = os.fspath(s)
TypeError: expected str, bytes or os.PathLike object, not VSVersionInfo
Here's the source at the crash site:
if self.versrsrc:
if not os.path.isabs(self.versrsrc): *** Crashes here.
# relative version-info path is relative to spec file
self.versrsrc = os.path.join(
CONF['specpath'], self.versrsrc)
Is this a regression, i.e., should I still be able to do this, or do I need to rewrite things to generate a file from the spec and feed that in?