Bug 1891840 - python-setuptools fails to build with Python 3.10: AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')
Summary: python-setuptools fails to build with Python 3.10: AssertionError: would buil...
Keywords:
Status: CLOSED DUPLICATE of bug 1899553
Alias: None
Product: Fedora
Classification: Fedora
Component: python-setuptools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-10-27 13:52 UTC by Tomáš Hrnčiar
Modified: 2020-11-24 14:29 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-24 14:29:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pypa wheel issues 354 0 None open Fails to build wheel for Python 3.10 2020-12-11 07:55:04 UTC

Description Tomáš Hrnčiar 2020-10-27 13:52:29 UTC
python-setuptools fails to build with Python 3.10.0a1.

=================================== FAILURES ===================================
________________________ test_wheel_install[extension] _________________________

params = {'file_defs': {'extension.c': '#include "Python.h"\n\n#if PY_MAJOR_VERSION >= 3\n\nstatic struct PyModuleDef moduledef...b_ext}'}, 'setup_kwargs': {'ext_modules': [setuptools.Extension(**{'name': 'extension', 'sources': ['extension.c']})]}}

    @pytest.mark.parametrize(
        'params', WHEEL_INSTALL_TESTS,
        ids=list(params['id'] for params in WHEEL_INSTALL_TESTS),
    )
    def test_wheel_install(params):
        project_name = params.get('name', 'foo')
        version = params.get('version', '1.0')
        install_requires = params.get('install_requires', [])
        extras_require = params.get('extras_require', {})
        requires_txt = params.get('requires_txt', None)
        install_tree = params.get('install_tree')
        file_defs = params.get('file_defs', {})
        setup_kwargs = params.get('setup_kwargs', {})
>       with build_wheel(
            name=project_name,
            version=version,
            install_requires=install_requires,
            extras_require=extras_require,
            extra_file_defs=file_defs,
            **setup_kwargs
        ) as filename, tempdir() as install_dir:

setuptools/tests/test_wheel.py:534: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.10/contextlib.py:117: in __enter__
    return next(self.gen)
setuptools/tests/test_wheel.py:95: in build_wheel
    subprocess.check_call((sys.executable, 'setup.py',
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

popenargs = (('/usr/bin/python3', 'setup.py', '-q', 'bdist_wheel'),)
kwargs = {'cwd': '/tmp/tmp997pwori'}, retcode = 1
cmd = ('/usr/bin/python3', 'setup.py', '-q', 'bdist_wheel')

    def check_call(*popenargs, **kwargs):
        """Run command with arguments.  Wait for command to complete.  If
        the exit code was zero then return, otherwise raise
        CalledProcessError.  The CalledProcessError object will have the
        return code in the returncode attribute.
    
        The arguments are the same as for the call function.  Example:
    
        check_call(["ls", "-l"])
        """
        retcode = call(*popenargs, **kwargs)
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           subprocess.CalledProcessError: Command '('/usr/bin/python3', 'setup.py', '-q', 'bdist_wheel')' returned non-zero exit status 1.

/usr/lib64/python3.10/subprocess.py:373: CalledProcessError
----------------------------- Captured stderr call -----------------------------
warning: install_lib: byte-compiling is disabled, skipping.

Traceback (most recent call last):
  File "/tmp/tmp997pwori/setup.py", line 4, in <module>
    setup(**{'name': 'foo', 'version': '1.0', 'install_requires': [], 'extras_require': {}, 'ext_modules': [setuptools.Extension(**{'name': 'extension', 'sources': ['extension.c']})]})
  File "/builddir/build/BUILD/setuptools-50.3.2/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.10/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib64/python3.10/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 328, in run
    impl_tag, abi_tag, plat_tag = self.get_tag()
  File "/usr/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
    assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')
=========================== short test summary info ============================
SKIPPED [2] setuptools/tests/test_msvc.py:17: could not import 'distutils.msvc9compiler': No module named 'winreg'
SKIPPED [1] pkg_resources/tests/test_pkg_resources.py:382: Testing case-insensitive filesystems.
SKIPPED [3] pkg_resources/tests/test_pkg_resources.py:399: Testing systems using backslashes as path separators.
SKIPPED [1] setuptools/tests/test_develop.py:105: TODO: needs a fixture to cause 'develop' to be invoked without mutating environment.
SKIPPED [1] setuptools/tests/test_install_scripts.py:50: Windows only
SKIPPED [1] setuptools/tests/test_install_scripts.py:78: Windows only
SKIPPED [1] setuptools/tests/test_msvc14.py:16: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:34: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:52: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:68: These tests are only for win32
SKIPPED [5] setuptools/tests/test_virtualenv.py:86: unconditional skip
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:69: Windows only
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:110: Windows only
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:169: Windows only
XFAIL setuptools/tests/test_bdist_egg.py::Test::test_exclude_source_files
  Byte code disabled
XFAIL setuptools/tests/test_dist.py::test_read_metadata[Metadata Version 1.2: Project-Url-attrs6]
  Issue #1578: project_urls not read
XFAIL setuptools/tests/test_dist.py::test_read_metadata[Metadata Version 2.1: Provides Extra-attrs8]
  provides_extras not read
XFAIL setuptools/tests/test_egg_info.py::TestEggInfo::test_requires[extras_require_with_marker_in_setup_cfg]
XPASS setuptools/tests/test_archive_util.py::test_unicode_files #710 and #712
= 1 failed, 659 passed, 21 skipped, 4 xfailed, 1 xpassed in 204.21s (0:03:24) ==
error: Bad exit status from /var/tmp/rpm-tmp.FEP0Lv (%check)
    extra tokens at the end of %endif directive in line 47:  %endif # with tests

    extra tokens at the end of %endif directive in line 55:  %endif # without bootstrap

    extra tokens at the end of %endif directive in line 166:  %endif # with tests

    Bad exit status from /var/tmp/rpm-tmp.FEP0Lv (%check)
For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01722881-python-setuptools/

For all our attempts to build python-setuptools with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-setuptools/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2020-10-27 14:26:20 UTC
This might actually be a wheel bug. Possibly relevant: https://github.com/python/cpython/pull/20333 and https://github.com/pypa/wheel/issues/354

Comment 2 Miro Hrončok 2020-11-24 14:29:38 UTC
setuptools builds fine with patched wheel: https://src.fedoraproject.org/rpms/python-wheel/pull-request/19

*** This bug has been marked as a duplicate of bug 1899553 ***


Note You need to log in before you can comment on or make changes to this bug.