unstructured icon indicating copy to clipboard operation
unstructured copied to clipboard

sdist for unstructured 0.12.6 fails to build or install

Open palotasb-booking opened this issue 6 months ago • 0 comments

The source distribution for unstructured==0.12.6 fails to build or install.

$ pip install --no-binary :all: unstructured==0.12.6
Collecting unstructured==0.12.6
  Downloading unstructured-0.12.6.tar.gz (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 8.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Traceback (most recent call last):
        File "/private/var/folders/2h/v5ccp8zj53q82rz7cwcrxy6r0000gp/T/tmp.9diGLkdmpn/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/private/var/folders/2h/v5ccp8zj53q82rz7cwcrxy6r0000gp/T/tmp.9diGLkdmpn/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/private/var/folders/2h/v5ccp8zj53q82rz7cwcrxy6r0000gp/T/tmp.9diGLkdmpn/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/2h/v5ccp8zj53q82rz7cwcrxy6r0000gp/T/pip-build-env-a36g9qm1/overlay/lib/python3.9/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/2h/v5ccp8zj53q82rz7cwcrxy6r0000gp/T/pip-build-env-a36g9qm1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/2h/v5ccp8zj53q82rz7cwcrxy6r0000gp/T/pip-build-env-a36g9qm1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/2h/v5ccp8zj53q82rz7cwcrxy6r0000gp/T/pip-build-env-a36g9qm1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 43, in <module>
        File "<string>", line 35, in load_requirements
      FileNotFoundError: [Errno 2] No such file or directory: 'requirements/extra-csv.txt'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

[notice] A new release of pip is available: 24.1.2 -> 24.2
[notice] To update, run: pip install --upgrade pip

This happens on MacOS, Python 3.9 via Homebrew, in a clean venv.

The same happens if you download and pip install https://files.pythonhosted.org/packages/ec/c1/144bb25196a9ea12f73a7cbeec4ef1c2986e7d109b836c77f5d7b31f8a8d/unstructured-0.12.6.tar.gz from https://pypi.org/project/unstructured/0.12.6/#files.

For context, this is the root cause of another issue we're facing downstream with PDM. We are using pdm lock to generate a lockfile for an application that depends on "unstructured<0.13.0,>=0.12.5", and since 0.12.6 got released PDM doesn't include any of unstructured's dependencies. It is probably attempting to read the dependencies from the sdist, and when the sdist installation fails, it results in an empty dependency list. So in this case it's not really an option to use wheels instead of the sdist.

palotasb-booking avatar Aug 01 '24 11:08 palotasb-booking