marcelotduarte / cx_Freeze

cx_Freeze creates standalone executables from Python scripts, with the same performance, is cross-platform and should work on any platform that Python itself works on.
https://marcelotduarte.github.io/cx_Freeze/
Other
1.28k stars 210 forks source link

UnboundLocalError: cannot access local variable 'exclude_names' where it is not associated with a value #2362

Closed gbtami closed 2 months ago

gbtami commented 2 months ago

Follow up to https://github.com/marcelotduarte/cx_Freeze/issues/2356 After the new MSYS2 cx-Freeze package arrived we triggered a new build for pychess bdist_msi https://github.com/pychess/pychess/actions/runs/8837952115/job/24269587548

marcelotduarte commented 2 months ago

https://github.com/marcelotduarte/cx_Freeze/pull/2363#issuecomment-2079740445

gbtami commented 2 months ago

Seems it produces the same error with 7.0.0-3 https://github.com/pychess/pychess/actions/runs/8855111639/job/24329191820

marcelotduarte commented 2 months ago

I'm sorry, I didn't patch msys2 correctly. But I'm also working on tests for the msys2 version, so it avoids these errors. I ended up discovering other errors with this #2367. I'm waiting for the pytest-datafiles package to become available and then I'll send a new patch.

hartwork commented 2 months ago

I'm sorry, I didn't patch msys2 correctly. But I'm also working on tests for the msys2 version, so it avoids these errors. I ended up discovering other errors with this #2367.

@marcelotduarte thanks for your help!

I'm waiting for the pytest-datafiles package to become available and then I'll send a new patch.

For anyone else wondering how or when pytest-datafiles will be available:

marcelotduarte commented 2 months ago

https://github.com/msys2/MINGW-packages/pull/20760 merged.

hartwork commented 2 months ago

@marcelotduarte thank you!

marcelotduarte commented 2 months ago

You can test the patch in the latest development build (7.1.0.dev9): pip install --force --no-cache --pre --extra-index-url https://marcelotduarte.github.io/packages/ cx_Freeze For conda-forge the command is: conda install -y --no-channel-priority -S -c https://marcelotduarte.github.io/packages/conda cx_Freeze For msys2, download the file at: https://marcelotduarte.github.io/packages/msys2/ and use it w/ pacman -U