deeplook / svglib

Read SVG files and convert them to other formats.
GNU Lesser General Public License v3.0
324 stars 79 forks source link

Issue installing the package while using setuptools > 70.0.0 #403

Open esirK opened 2 weeks ago

esirK commented 2 weeks ago

Hey. I'm trying to pip install svglib but it does fail with the following error

Collecting svglib
  Using cached svglib-1.5.1.tar.gz (913 kB)
  Preparing metadata (setup.py) ... done
Collecting reportlab (from svglib)
  Using cached reportlab-4.2.5-py3-none-any.whl.metadata (1.5 kB)
Requirement already satisfied: lxml in /usr/local/lib/python3.8/dist-packages (from svglib) (4.6.5)
Requirement already satisfied: tinycss2>=0.6.0 in /usr/local/lib/python3.8/dist-packages (from svglib) (1.2.1)
Collecting cssselect2>=0.2.0 (from svglib)
  Using cached cssselect2-0.7.0-py3-none-any.whl.metadata (2.9 kB)
Requirement already satisfied: webencodings in /usr/local/lib/python3.8/dist-packages (from cssselect2>=0.2.0->svglib) (0.5.1)
Requirement already satisfied: pillow>=9.0.0 in /usr/local/lib/python3.8/dist-packages (from reportlab->svglib) (10.4.0)
Requirement already satisfied: chardet in /usr/local/lib/python3.8/dist-packages (from reportlab->svglib) (3.0.4)
Using cached cssselect2-0.7.0-py3-none-any.whl (15 kB)
Using cached reportlab-4.2.5-py3-none-any.whl (1.9 MB)
Building wheels for collected packages: svglib
  Building wheel for svglib (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-pukd9po8/svglib_8725377d5c3a4cfdbad1daf9a0ac04c2/setup.py", line 10, in <module>
          setup(
        File "/usr/local/lib/python3.8/dist-packages/setuptools/__init__.py", line 111, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/core.py", line 171, in setup
          ok = dist.parse_command_line()
        File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/dist.py", line 478, in parse_command_line
          args = self._parse_command_opts(parser, args)
        File "/usr/local/lib/python3.8/dist-packages/setuptools/dist.py", line 850, in _parse_command_opts
          nargs = _Distribution._parse_command_opts(self, parser, args)
        File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/dist.py", line 537, in _parse_command_opts
          cmd_class = self.get_command_class(command)
        File "/usr/local/lib/python3.8/dist-packages/setuptools/dist.py", line 689, in get_command_class
          from .command.bdist_wheel import bdist_wheel
        File "/usr/local/lib/python3.8/dist-packages/setuptools/command/bdist_wheel.py", line 26, in <module>
          from wheel.wheelfile import WheelFile
      ModuleNotFoundError: No module named 'wheel.wheelfile'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for svglib
  Running setup.py clean for svglib
Failed to build svglib
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (svglib)

The issue seems to be related to setuptools and wheel version. Should the recommended setuptools version be set?

github-actions[bot] commented 2 weeks ago

Thank you for raising your first issue! Your help to improve svglib is much appreciated!