[MacPorts] #74354: py311-cython @3.2.9_0: build failure — "invalid command 'egg_info'" with setuptools 80.10.2

MacPorts noreply at macports.org
Mon Aug 24 03:12:39 UTC 2026


#74354: py311-cython @3.2.9_0: build failure — "invalid command 'egg_info'" with
setuptools 80.10.2
---------------------------+--------------------------
 Reporter:  saherr1969     |      Owner:  (none)
     Type:  defect         |     Status:  new
 Priority:  Normal         |  Milestone:
Component:  ports          |    Version:  2.12.5
 Keywords:  build_failure  |       Port:  py311-cython
---------------------------+--------------------------
 py311-cython @3.2.9_0 fails to build from source. The build uses `--no-
 isolation` mode, and the currently installed
   py311-setuptools @80.10.2 no longer provides the legacy `egg_info`
 command.

   === Environment ===

   * macOS 26.5.2 (darwin/25.5.0), arm64
   * Xcode 26.6, CLT 26.6.0.0.1781586589
   * MacPorts 2.12.5
   * py311-setuptools @80.10.2

   === Error ===

   {{{
   * Getting build dependencies for wheel...
   Unable to find pgen, not compiling formal grammar.
 /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11
 /site-packages/setuptools/_distutils/dist.
   py:289:
   UserWarning: Unknown distribution option: 'python_requires'
     warnings.warn(msg)
 /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11
 /site-packages/setuptools/_distutils/dist.
   py:289:
   UserWarning: Unknown distribution option: 'zip_safe'
     warnings.warn(msg)
 /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11
 /site-packages/setuptools/_distutils/dist.
   py:289:
   UserWarning: Unknown distribution option: 'entry_points'
     warnings.warn(msg)
   usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
      or: setup.py --help [cmd1 cmd2 ...]
      or: setup.py --help-commands
      or: setup.py cmd --help
   error: invalid command 'egg_info'
   ERROR Backend subprocess exited when trying to invoke
 get_requires_for_build_wheel
   }}}

   === Analysis ===

   setuptools >= 80 removed the legacy `egg_info` command. Cython 3.2.9's
 `setup.py` build path still invokes it via
   `get_requires_for_build_wheel`. Since the port builds with `--no-
 isolation`, it uses the system-installed setuptools
   directly.

   Possible fixes:
   * Pin `py311-setuptools` dependency to a version that still provides
 `egg_info`
   * Patch the portfile to build with isolation (`--isolation`) so a
 compatible setuptools is used
   * Wait for upstream Cython to support modern setuptools without
 `egg_info`

-- 
Ticket URL: <https://trac.macports.org/ticket/74354>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list