OpenAdaptAI / OpenAdapt

Open Source Generative Process Automation (i.e. Generative RPA). AI-First Process Automation with Large ([Language (LLMs) / Action (LAMs) / Multimodal (LMMs)] / Visual Language (VLMs)) Models
https://www.OpenAdapt.AI
MIT License
976 stars 134 forks source link

[Bug]: fastavro does not support PEP 517 builds #436

Open jesicasusanto opened 1 year ago

jesicasusanto commented 1 year ago

Describe the bug

after poetry add griptape :

Using version ^0.14.7 for griptape

Updating dependencies
Resolving dependencies... (69.5s)

Package operations: 18 installs, 0 updates, 0 removals

  • Installing fastavro (1.7.4): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel

  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-universal2-cpython-310
  creating build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_schema_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_schema_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_logical_writers_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/json_read.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/write.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_write_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_write_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_read_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/types.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/json_write.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_read_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_validate_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_logical_readers_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/utils.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/logical_writers.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/_validation_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/__main__.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/logical_readers.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/const.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/schema.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/read.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  copying fastavro/validation.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  creating build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
  copying fastavro/io/binary_decoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
  copying fastavro/io/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
  copying fastavro/io/binary_encoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
  copying fastavro/io/parser.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
  copying fastavro/io/symbols.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
  copying fastavro/io/json_encoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
  copying fastavro/io/json_decoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
  creating build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository
  copying fastavro/repository/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository
  copying fastavro/repository/flat_dict.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository
  copying fastavro/repository/base.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository
  copying fastavro/py.typed -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
  running build_ext

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
              writer_schema, named_schemas, offset, size, return_record_name, return_record_name_override
          )

  class Block:
      def __init__(
      ^
  ------------------------------------------------------------

  fastavro/_read.pyx:976:4: Compiler crash in AnalyseDeclarationsTransform

  File 'ModuleNode.py', line 203, in analyse_declarations: ModuleNode(_read.pyx:1:0,
      doc = 'Python code for reading AVRO files',
      full_module_name = 'fastavro._read')
  File 'Nodes.py', line 393, in analyse_declarations: StatListNode(_read.pyx:10:0)
  File 'Nodes.py', line 393, in analyse_declarations: StatListNode(_read.pyx:975:0)
  File 'Nodes.py', line 5121, in analyse_declarations: PyClassDefNode(_read.pyx:975:0,
      name = 'Block')
  File 'Nodes.py', line 393, in analyse_declarations: StatListNode(_read.pyx:976:4)
  File 'Nodes.py', line 2710, in analyse_declarations: CFuncDefNode(_read.pyx:976:4,
      args = [...]/11,
      modifiers = [...]/0,
      outer_attrs = [...]/2,
      overridable = True,
      visibility = 'private')
  File 'Nodes.py', line 2721, in declare_cpdef_wrapper: CFuncDefNode(_read.pyx:976:4,
      args = [...]/11,
      modifiers = [...]/0,
      outer_attrs = [...]/2,
      overridable = True,
      visibility = 'private')
  File 'Nodes.py', line 2787, in call_self_node: CFuncDefNode(_read.pyx:976:4,
      args = [...]/11,
      modifiers = [...]/0,
      outer_attrs = [...]/2,
      overridable = True,
      visibility = 'private')

  Compiler crash traceback from this point on:
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/Cython/Compiler/Nodes.py", line 2787, in call_self_node
      type_entry = self.type.args[0].type.entry
  AttributeError: 'PyObjectType' object has no attribute 'entry'
  Compiling fastavro/_read.pyx because it changed.
  [1/1] Cythonizing fastavro/_read.pyx
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 416, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 37, in <module>
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 346, in run
      self.run_command("build")
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run
      _build_ext.run(self)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
      self.build_extensions()
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
      _build_ext.build_extension(self, ext)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension
      new_ext = cythonize(
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
      cythonize_one(*args)
    File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmp9jgzii4x/.venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: fastavro/_read.pyx

  at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/poetry/installation/chef.py:147 in _prepare
      143│ 
      144│                 error = ChefBuildError("\n\n".join(message_parts))
      145│ 
      146│             if error is not None:
    → 147│                 raise error from None
      148│ 
      149│             return path
      150│ 
      151│     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 fastavro (1.7.4) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "fastavro (==1.7.4)"'.

after running pip wheel --use-pep517 "fastavro (==1.7.4)

Collecting fastavro==1.7.4
  Using cached fastavro-1.7.4.tar.gz (791 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: fastavro
  Building wheel for fastavro (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for fastavro (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [150 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-310
      creating build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_schema_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_schema_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_logical_writers_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/json_read.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/write.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_write_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_write_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_read_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/types.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/json_write.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_read_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_validate_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_logical_readers_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/utils.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/logical_writers.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/_validation_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/__main__.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/logical_readers.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/const.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/schema.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/read.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      copying fastavro/validation.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      creating build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
      copying fastavro/io/binary_decoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
      copying fastavro/io/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
      copying fastavro/io/binary_encoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
      copying fastavro/io/parser.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
      copying fastavro/io/symbols.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
      copying fastavro/io/json_encoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
      copying fastavro/io/json_decoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io
      creating build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository
      copying fastavro/repository/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository
      copying fastavro/repository/flat_dict.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository
      copying fastavro/repository/base.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository
      copying fastavro/py.typed -> build/lib.macosx-10.9-universal2-cpython-310/fastavro
      running build_ext

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
                  writer_schema, named_schemas, offset, size, return_record_name, return_record_name_override
              )

      class Block:
          def __init__(
          ^
      ------------------------------------------------------------

      fastavro/_read.pyx:976:4: Compiler crash in AnalyseDeclarationsTransform

      File 'ModuleNode.py', line 203, in analyse_declarations: ModuleNode(_read.pyx:1:0,
          doc = 'Python code for reading AVRO files',
          full_module_name = 'fastavro._read')
      File 'Nodes.py', line 393, in analyse_declarations: StatListNode(_read.pyx:10:0)
      File 'Nodes.py', line 393, in analyse_declarations: StatListNode(_read.pyx:975:0)
      File 'Nodes.py', line 5121, in analyse_declarations: PyClassDefNode(_read.pyx:975:0,
          name = 'Block')
      File 'Nodes.py', line 393, in analyse_declarations: StatListNode(_read.pyx:976:4)
      File 'Nodes.py', line 2710, in analyse_declarations: CFuncDefNode(_read.pyx:976:4,
          args = [...]/11,
          modifiers = [...]/0,
          outer_attrs = [...]/2,
          overridable = True,
          visibility = 'private')
      File 'Nodes.py', line 2721, in declare_cpdef_wrapper: CFuncDefNode(_read.pyx:976:4,
          args = [...]/11,
          modifiers = [...]/0,
          outer_attrs = [...]/2,
          overridable = True,
          visibility = 'private')
      File 'Nodes.py', line 2787, in call_self_node: CFuncDefNode(_read.pyx:976:4,
          args = [...]/11,
          modifiers = [...]/0,
          outer_attrs = [...]/2,
          overridable = True,
          visibility = 'private')

      Compiler crash traceback from this point on:
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/Cython/Compiler/Nodes.py", line 2787, in call_self_node
          type_entry = self.type.args[0].type.entry
      AttributeError: 'PyObjectType' object has no attribute 'entry'
      Compiling fastavro/_read.pyx because it changed.
      [1/1] Cythonizing fastavro/_read.pyx
      Traceback (most recent call last):
        File "/Users/jesicasusanto/Library/Caches/pypoetry/virtualenvs/openadapt-g-n4HnhN-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/jesicasusanto/Library/Caches/pypoetry/virtualenvs/openadapt-g-n4HnhN-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/jesicasusanto/Library/Caches/pypoetry/virtualenvs/openadapt-g-n4HnhN-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 416, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
          self.run_setup()
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 37, in <module>
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 346, in run
          self.run_command("build")
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
          _build_ext.build_extension(self, ext)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension
          new_ext = cythonize(
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
          cythonize_one(*args)
        File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/pip-build-env-fpdmpade/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: fastavro/_read.pyx
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fastavro
Failed to build fastavro
ERROR: Failed to build one or more wheels

To Reproduce

I use macOS and followed the poetry installation steps in the readme.

abrichr commented 1 year ago

Thanks @jesicasusanto ! Is this on main? Can you please try installing again into a separate location? Please try both approaches (manual and scripted).

jesicasusanto commented 1 year ago

after running in the main branch with scripted installation, then poetry add griptape: `Using version ^0.14.7 for griptape

Updating dependencies Resolving dependencies... (68.4s)

Package operations: 48 installs, 1 update, 0 removals

• Installing pycparser (2.21) • Installing cffi (1.15.1) • Updating urllib3 (2.0.4 -> 1.26.16) • Installing asn1crypto (1.5.1) • Installing cryptography (40.0.2) • Installing jmespath (1.0.1) • Installing rpds-py (0.9.2) • Installing tzlocal (5.0.1) • Installing botocore (1.31.14) • Installing dateparser (1.1.8) • Installing httpcore (0.17.3) • Installing mdurl (0.1.2) • Installing oscrypto (1.3.0) • Installing pycryptodomex (3.18.0) • Installing pyjwt (2.8.0) • Installing pyopenssl (23.2.0) • Installing referencing (0.30.0) • Installing sortedcontainers (2.4.0) • Installing tld (0.13) • Installing backoff (2.2.1): Installing... • Installing contextlib2 (21.6.0) • Installing backoff (2.2.1) • Installing contextlib2 (21.6.0) • Installing courlan (0.9.3) • Installing dnspython (2.4.1) • Installing fastavro (1.7.4): Failed

ChefBuildError

Backend subprocess exited when trying to invoke build_wheel

running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-universal2-cpython-310 creating build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_schema_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_schema_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_logical_writers_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/json_read.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/write.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_write_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_write_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/init.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_read_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/types.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/json_write.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_read_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_validate_common.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_logical_readers_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/utils.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/logical_writers.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/_validation_py.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/main.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/logical_readers.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/const.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/schema.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/read.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro copying fastavro/validation.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro creating build/lib.macosx-10.9-universal2-cpython-310/fastavro/io copying fastavro/io/binary_decoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io copying fastavro/io/init.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io copying fastavro/io/binary_encoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io copying fastavro/io/parser.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io copying fastavro/io/symbols.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io copying fastavro/io/json_encoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io copying fastavro/io/json_decoder.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/io creating build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository copying fastavro/repository/init.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository copying fastavro/repository/flat_dict.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository copying fastavro/repository/base.py -> build/lib.macosx-10.9-universal2-cpython-310/fastavro/repository copying fastavro/py.typed -> build/lib.macosx-10.9-universal2-cpython-310/fastavro running build_ext

Error compiling Cython file:

... writer_schema, named_schemas, offset, size, return_record_name, return_record_name_override )

class Block: def init( ^

fastavro/_read.pyx:976:4: Compiler crash in AnalyseDeclarationsTransform

File 'ModuleNode.py', line 203, in analyse_declarations: ModuleNode(_read.pyx:1:0, doc = 'Python code for reading AVRO files', full_module_name = 'fastavro._read') File 'Nodes.py', line 393, in analyse_declarations: StatListNode(_read.pyx:10:0) File 'Nodes.py', line 393, in analyse_declarations: StatListNode(_read.pyx:975:0) File 'Nodes.py', line 5121, in analyse_declarations: PyClassDefNode(_read.pyx:975:0, name = 'Block') File 'Nodes.py', line 393, in analyse_declarations: StatListNode(_read.pyx:976:4) File 'Nodes.py', line 2710, in analyse_declarations: CFuncDefNode(_read.pyx:976:4, args = [...]/11, modifiers = [...]/0, outer_attrs = [...]/2, overridable = True, visibility = 'private') File 'Nodes.py', line 2721, in declare_cpdef_wrapper: CFuncDefNode(_read.pyx:976:4, args = [...]/11, modifiers = [...]/0, outer_attrs = [...]/2, overridable = True, visibility = 'private') File 'Nodes.py', line 2787, in call_self_node: CFuncDefNode(_read.pyx:976:4, args = [...]/11, modifiers = [...]/0, outer_attrs = [...]/2, overridable = True, visibility = 'private')

Compiler crash traceback from this point on: File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/Cython/Compiler/Nodes.py", line 2787, in call_self_node type_entry = self.type.args[0].type.entry AttributeError: 'PyObjectType' object has no attribute 'entry' Compiling fastavro/_read.pyx because it changed. [1/1] Cythonizing fastavro/_read.pyx Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(hook_input['kwargs']) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel return _build_backend().build_wheel(wheel_directory, config_settings, File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 416, in build_wheel return self._build_with_temp_dir(['bdist_wheel'], '.whl', File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir self.run_setup() File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 37, in File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/init.py", line 107, in setup return distutils.core.setup(attrs) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 346, in run self.run_command("build") File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run self.run_command(cmd_name) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run self.build_extensions() File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions self._build_extensions_serial() File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial self.build_extension(ext) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 246, in build_extension _build_ext.build_extension(self, ext) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension new_ext = cythonize( File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize cythonize_one(*args) File "/private/var/folders/s3/4rk3zm6x3x114pw4d1ph5mdw0000gn/T/tmpckd3fzph/.venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: fastavro/_read.pyx

at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/poetry/installation/chef.py:147 in _prepare 143│ 144│ error = ChefBuildError("\n\n".join(message_parts)) 145│ 146│ if error is not None: → 147│ raise error from None 148│ 149│ return path 150│ 151│ 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 fastavro (1.7.4) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "fastavro (==1.7.4)"'.

• Installing htmldate (1.4.3) • Installing httpx (0.24.1) • Installing jsonschema-specifications (2023.7.1) • Installing justext (3.0.0) • Installing markdown-it-py (3.0.0) • Installing marshmallow (3.20.1) • Installing s3transfer (0.6.1) • Installing snowflake-connector-python (3.0.4)`

after running in the main branch with manual installation, then poetry add griptape i also get the same error.

jesicasusanto commented 1 year ago

but looks like this issue is fixed in fastavro >=1.8.1. check this https://github.com/fastavro/fastavro/issues/701 @abrichr

jesicasusanto commented 1 year ago

doing this should solve the issue @abrichr : after poetry add "fastavro^1.8.1"

Updating dependencies
Resolving dependencies... (5.9s)

Package operations: 1 install, 3 updates, 0 removals

  • Updating urllib3 (1.26.16 -> 2.0.4)
  • Updating tomlkit (0.12.1 -> 0.11.8)
  • Updating pylint (2.17.5 -> 2.17.4)
  • Installing fastavro (1.8.2)

Writing lock file

then poetry add grip tape

Using version ^0.14.7 for griptape

Updating dependencies
Resolving dependencies... (72.1s)

Package operations: 45 installs, 1 update, 0 removals

  • Updating urllib3 (2.0.4 -> 1.26.16)
  • Installing asn1crypto (1.5.1)
  • Installing cryptography (40.0.2)
  • Installing jmespath (1.0.1)
  • Installing rpds-py (0.9.2)
  • Installing tzlocal (5.0.1)
  • Installing botocore (1.31.14)
  • Installing dateparser (1.1.8)
  • Installing httpcore (0.17.3)
  • Installing mdurl (0.1.2)
  • Installing oscrypto (1.3.0)
  • Installing pycryptodomex (3.18.0)
  • Installing pyjwt (2.8.0)
  • Installing pyopenssl (23.2.0)
  • Installing referencing (0.30.0)
  • Installing sortedcontainers (2.4.0)
  • Installing tld (0.13)
  • Installing backoff (2.2.1)
  • Installing contextlib2 (21.6.0)
  • Installing courlan (0.9.3)
  • Installing dnspython (2.4.1)
  • Installing htmldate (1.4.3)
  • Installing httpx (0.24.1)
  • Installing jsonschema-specifications (2023.7.1)
  • Installing justext (3.0.0)
  • Installing markdown-it-py (3.0.0)
  • Installing marshmallow (3.20.1)
  • Installing s3transfer (0.6.1)
  • Installing snowflake-connector-python (3.0.4)
  • Installing anthropic (0.2.10)
  • Installing boto3 (1.28.14)
  • Installing cohere (4.17.0)
  • Installing graphlib (0.9.5)
  • Installing jsonschema (4.18.4)
  • Installing marqo (1.1.1)
  • Installing marshmallow-enum (1.5.1)
  • Installing pinecone-client (2.0.13)
  • Installing pypdf2 (3.0.1)
  • Installing python-decouple (3.8)
  • Installing rich (13.4.2)
  • Installing schema (0.7.5)
  • Installing snowflake-sqlalchemy (1.4.7)
  • Installing sqlalchemy-redshift (0.8.14)
  • Installing stopit (1.1.2)
  • Installing trafilatura (1.6.1)
  • Installing griptape (0.14.7)

Writing lock file