concentration icon indicating copy to clipboard operation
concentration copied to clipboard

Concentration fails to compile with PyYaml = 6.0.0

Open vedang opened this issue 7 months ago • 0 comments

I tried installing concentration using pipx (pipx install concentration) as well as compiling it (poetry install). In both cases, it failed with the following error:

Installing dependencies from lock file

Package operations: 13 installs, 1 update, 0 removals

  - Downgrading pyyaml (6.0.1 -> 6.0): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke get_requires_for_build_wheel

  running egg_info
  writing lib/PyYAML.egg-info/PKG-INFO
  writing dependency_links to lib/PyYAML.egg-info/dependency_links.txt
  writing top-level names to lib/PyYAML.egg-info/top_level.txt
  Traceback (most recent call last):
    File "/opt/homebrew/Cellar/poetry/1.8.3_2/libexec/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", li
ne 373, in <module>
      main()
    File "/opt/homebrew/Cellar/poetry/1.8.3_2/libexec/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", li
ne 357, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/homebrew/Cellar/poetry/1.8.3_2/libexec/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", li
ne 134, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/build
_meta.py", line 327, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/build
_meta.py", line 297, in _get_build_requires
      self.run_setup()
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/build
_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 288, in <module>
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/__ini
t__.py", line 103, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/_dist
utils/core.py", line 184, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/_dist
utils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/_dist
utils/dist.py", line 970, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/dist.
py", line 974, in run_command
      super().run_command(command)
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/_dist
utils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/comma
nd/egg_info.py", line 321, in run
      self.find_sources()
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/comma
nd/egg_info.py", line 329, in find_sources
      mm.run()
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/comma
nd/egg_info.py", line 550, in run
      self.add_defaults()
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/comma
nd/egg_info.py", line 588, in add_defaults
      sdist.add_defaults(self)
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/comma
nd/sdist.py", line 102, in add_defaults
      super().add_defaults()
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/_dist
utils/command/sdist.py", line 250, in add_defaults
      self._add_defaults_ext()
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/_dist
utils/command/sdist.py", line 335, in _add_defaults_ext
      self.filelist.extend(build_ext.get_source_files())
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<string>", line 204, in get_source_files
    File "/private/var/folders/q_/lbnnsbk52cn25y0ckwwtybz80000gn/T/tmpmyx_u14p/.venv/lib/python3.12/site-packages/setuptools/_dist
utils/cmd.py", line 107, in __getattr__
      raise AttributeError(attr)
  AttributeError: cython_sources

  at /opt/homebrew/Cellar/poetry/1.8.3_2/libexec/lib/python3.12/site-packages/poetry/installation/chef.py:164 in _prepare
      160│
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│
      163│             if error is not None:
   → 164│                 raise error from None
      165│
      166│             return path
      167│
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with pyyaml (6.0) not supporting P
EP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pyyaml (==6.0)"'.

On Googling, I found the same stack-trace in https://github.com/python-poetry/poetry/issues/8287, and also an associated fix: Upgrading PyYaml to 6.0.1

I did that using poetry add pyyaml, which fixed the problem.

This PR contains the changes to the lock file due to the poetry add pyyaml command.

vedang avatar Jul 03 '24 09:07 vedang