It turns out the information I've seen is incorrect. You need to include the path to your imported scripts in the pathex portion of the spec file (or use --paths when building without a spec file.
a = Analysis(
['c:\\Users\\name\\python_projects\\projectname\\src\\projectname\\main_script.py'],
pathex=['c:\\Users\\name\\python_projects\\projectname\\.venv\\Lib\\site-packages', 'c:\\Users\\name\\python_projects\\projectname\\src\\projectname'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)