Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2582

distutils.errors.DistutilsClassError when building with setup.py

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.8.4
    • 2.8.3
    • Packaging & Deployment
    • None
    • Debian bookworm/unstable

      With a recent update of the Python toolchain, picard now fails to build in Debian bookworm/unstable:

      I: pybuild base:240: /usr/bin/python3 setup.py build --disable-autoupdate
      /<<PKGBUILDDIR>>/setup.py:42: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
        from distutils import log
      
      /usr/lib/python3/dist-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
        warnings.warn(
      /usr/lib/python3/dist-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
        warnings.warn("Setuptools is replacing distutils.")
      Traceback (most recent call last):
        File "/<<PKGBUILDDIR>>/setup.py", line 845, in <module>
          setup(**args)
        File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 172, in setup
          ok = dist.parse_command_line()
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 474, in parse_command_line
          args = self._parse_command_opts(parser, args)
        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1107, in _parse_command_opts
          nargs = _Distribution._parse_command_opts(self, parser, args)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 540, in _parse_command_opts
          raise DistutilsClassError(
      distutils.errors.DistutilsClassError: command class <class '__main__.picard_build'> must subclass Command
      

      The full log is available from here.

            outsidecontext Philipp Wolfer
            sebastinas Sebastian Ramacher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package
                2.8.4