Skip to content

TypeError if setuptools_rust are used and python-distutils-extra are installed #221

@mgorny

Description

@mgorny

I'm sorry if this is the wrong place to report this but I'm not really sure where the problem lies and setuptools_rust just happens to be at the end of traceback ;-).

I've received a bug report from a Gentoo user whose trying to build cryptography (which uses setuptools-rust) on a system where python-distutils-extra is installed as well. An attempt to call build command results in the following traceback:

Traceback (most recent call last):
  File "/tmp/portage/dev-python/cryptography-36.0.2/work/cryptography-36.0.2/setup.py", line 39, in <module>
    setup(
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1214, in run_command
    super().run_command(command)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 985, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/DistUtilsExtra/command/build_extra.py", line 57, in finalize_options
    distutils.command.build.build.finalize_options(self)
  File "/usr/lib/python3.10/site-packages/setuptools_rust/setuptools_ext.py", line 264, in finalize_options
    super().finalize_options()
TypeError: super(type, obj): obj must be an instance or subtype of type

Similar problems occur when calling other setup.py commands or the PEP517 backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions