marcelotduarte/cx_Freeze

cx_Freeze.exception.OptionError: no base named 'console' ('console-cpython-311-darwin')

abhinavbandaru opened this issue · 8 comments

Error
When trying to run setup function of cx_freeze (snippet attached later), facing the following issue

Traceback (most recent call last):
   File "/Volumes/build/mts/release/sb-73133480/bora/install/vcsa-installer/vcsaCliInstaller/setup.py", line 130, in <module>
     Executable(script='main.py',
   File "/Volumes/build/mts/release/sb-73133480/bora/install/vcsa-installer/vcsaCliInstaller/deps/cx_freeze/cx_Freeze/executable.py", line 43, in __init__
     self.base = base
     ^^^^^^^^^
   File "/Volumes/build/mts/release/sb-73133480/bora/install/vcsa-installer/vcsaCliInstaller/deps/cx_freeze/cx_Freeze/executable.py", line 77, in base
     raise OptionError(f"no base named {name!r} ({name_base!r})")
cx_Freeze.exception.OptionError: no base named 'console' ('console-cpython-311-darwin')

To Reproduce
I installed cx_freeze-6.15.16 tar from pypi and then unpacked it to create a universal mac whl in the following way (the commands are run from inside the unpacked tar):

export CFLAGS =-arch x86_64 -arch arm64 -I/${PYTHON_PATH}
export ARCHFLAGS=-arch x86_64 -arch arm64
export MACOSX_DEPLOYMENT_TARGET=12.6
${PYTHON_PATH} setup.py bdist_wheel

And then run the setup function of cx_freeze. Attaching snippet below.
Snippet of setup.py:

from cx_Freeze import setup, Executable

buildOptions = dict(
    zip_include_packages=["*"],
    zip_exclude_packages=[],
    optimize=2,
    excludes=excludes,
    includes=includes,
    include_files=INCLUDE_FILES,
    packages=packages,
    path=sys.path)

executables = [
    Executable(script='main.py',
               target_name=utils.platform.get_bin_file_name(product))
]

setup(name='install',
      version='6.15',
      description="<redacted>",
      options=dict(build_exe=buildOptions),
      executables=executables,
      data_files=data_files)

Desktop:

  • Platform information: Macosx Monterey
  • OS architecture: x86_64
  • cx_Freeze version: 6.15.16
  • Python version: 3.11.4

Please lmk if additional information is required.

Please read https://cx-freeze.readthedocs.io/en/stable/development/index.html#building-redistributable-binary-wheels

In your case, use:
pip install --upgrade cibuildwheel
cibuildwheel --only cp311-macosx_universal2

Can I close the issue?

My apologies, I couldn't revert back. I'll need a day more to confirm this.