Bug 2319634 - mopidy fails to build with setuptools 74+
Summary: mopidy fails to build with setuptools 74+
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mopidy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tobi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: SETUPTOOLS74
TreeView+ depends on / blocked
 
Reported: 2024-10-18 10:08 UTC by Miro Hrončok
Modified: 2024-10-25 13:08 UTC (History)
1 user (show)

Fixed In Version: mopidy-3.4.2-6.fc42 mopidy-3.4.2-7.fc42
Clone Of:
Environment:
Last Closed: 2024-10-25 13:07:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2024-10-18 10:08:14 UTC
Dear package maintainer,

this bugzilla is automated becasue the number of impacted packages it too high to go trough manually.

It appears that your package failed to build with setuptools 74.1.3 and wheel 0.44 in

  https://copr.fedorainfracloud.org/coprs/churchyard/setuptools-74/package/mopidy/

While it succeeded with setuptools 69.2.0 and wheel 0.43 in

  https://copr.fedorainfracloud.org/coprs/churchyard/setuptools-control/package/mopidy/

This usually means this package fails to build with setuptools 74+

We plan to update setuptools to version 74 or newer in Fedora 42. This is and approved Fedora 42 Change:

  https://fedoraproject.org/wiki/Changes/Setuptools_74+



Please analyze the failure and fix it in rawhide. Thanks.


You can use the builds from the churchyard/setuptools-74 copr for local testing.

  mock -r fedora-rawhide-x86_64 --addrepo 'https://download.copr.fedorainfracloud.org/results/churchyard/setuptools-74/fedora-rawhide-$basearch/'


One of the most common problems is that the setup.py test command cannot be used. If that is the case here, run the tests in %check differently, e.g. via %pytest, %tox, %{python3} -m unittest, etc.


If you need help, reach out to me in this bugzilla.

Comment 1 Fedora Update System 2024-10-24 19:38:59 UTC
FEDORA-2024-2f2bd1879a (mopidy-3.4.2-6.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-2f2bd1879a

Comment 2 Miro Hrončok 2024-10-24 19:48:20 UTC
Unfortunately, this still fails in https://copr.fedorainfracloud.org/coprs/churchyard/setuptools-74/package/mopidy/ but differently now.

=================================== FAILURES ===================================
____________________ HelpTest.test_help_has_mopidy_options _____________________

self = <tests.test_help.HelpTest testMethod=test_help_has_mopidy_options>

    def test_help_has_mopidy_options(self):
        mopidy_dir = os.path.dirname(mopidy.__file__)
        args = [sys.executable, mopidy_dir, "--help"]
        process = subprocess.Popen(
            args,
            env={
                "PYTHONPATH": ":".join(
                    [
                        os.path.join(mopidy_dir, ".."),
                        os.environ.get("PYTHONPATH", ""),
                    ]
                )
            },
            stdout=subprocess.PIPE,
        )
        output = process.communicate()[0]
>       assert b"--version" in output
E       AssertionError: assert b'--version' in b''

tests/test_help.py:26: AssertionError
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/builddir/build/BUILD/mopidy-3.4.2-build/Mopidy-3.4.2/mopidy/__main__.py", line 7, in <module>
    from mopidy import commands
  File "/builddir/build/BUILD/mopidy-3.4.2-build/Mopidy-3.4.2/mopidy/__init__.py", line 5, in <module>
    import pkg_resources
  File "/usr/lib/python3.13/site-packages/pkg_resources/__init__.py", line 95, in <module>
    from jaraco.text import drop_comment, join_continuation, yield_lines
  File "/usr/lib/python3.13/site-packages/setuptools/_vendor/jaraco/text/__init__.py", line 12, in <module>
    from jaraco.context import ExceptionTrap
  File "/usr/lib/python3.13/site-packages/setuptools/_vendor/jaraco/context.py", line 11, in <module>
    import urllib.request
  File "/usr/lib64/python3.13/urllib/request.py", line 88, in <module>
    import http.client
  File "/builddir/build/BUILD/mopidy-3.4.2-build/Mopidy-3.4.2/mopidy/http/__init__.py", line 11, in <module>
    class Extension(ext.Extension):
    ...<45 lines>...
            )
  File "/builddir/build/BUILD/mopidy-3.4.2-build/Mopidy-3.4.2/mopidy/http/__init__.py", line 14, in Extension
    version = mopidy.__version__
              ^^^^^^^^^^^^^^^^^^
AttributeError: partially initialized module 'mopidy' from '/builddir/build/BUILD/mopidy-3.4.2-build/Mopidy-3.4.2/mopidy/__init__.py' has no attribute '__version__' (most likely due to a circular import)

Comment 3 Fedora Update System 2024-10-24 20:13:10 UTC
FEDORA-2024-2f2bd1879a (mopidy-3.4.2-6.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Tobi 2024-10-24 20:15:41 UTC
hi miro, thanks for the heads up. i'll take another look.

Comment 5 Fedora Update System 2024-10-25 13:03:37 UTC
FEDORA-2024-131c7f35b0 (mopidy-3.4.2-7.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-131c7f35b0

Comment 6 Fedora Update System 2024-10-25 13:07:12 UTC
FEDORA-2024-131c7f35b0 (mopidy-3.4.2-7.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Tobi 2024-10-25 13:08:02 UTC
ok, this traceback was weird.

  File "/usr/lib64/python3.13/urllib/request.py", line 88, in <module>
    import http.client
  File "/builddir/build/BUILD/mopidy-3.4.2-build/Mopidy-3.4.2/mopidy/http/__init__.py", line 11, in <module>

the test in question sets PYTHONPATH to the directory containing mopidy's __init__.py, which happens to also have a http/ submodule in it. this confuses the importer, and it imports the wrong module instead of http from the stdlib. this test was modified in the current development branch and the 4.0 alpha to not depend on modifying pythonpath.

with that backported, the copr turns green.


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