Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-running a build command results in max() arg is an empty sequence at end #1089

Closed
Strilanc opened this issue Apr 12, 2022 · 3 comments
Closed

Comments

@Strilanc
Copy link

Strilanc commented Apr 12, 2022

Run this command (or a similar one) twice:

CIBW_BUILD=cp39-musllinux_i686 cibuildwheel --platform linux

The second run will end with a failure like this one:

Traceback (most recent call last):
  File ".../bin/cibuildwheel", line 8, in <module>
    sys.exit(main())
  File ".../python3.9/site-packages/cibuildwheel/__main__.py", line 213, in main
    assert_never(platform)
  File "/usr/lib/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File ".../python3.9/site-packages/cibuildwheel/util.py", line 433, in print_new_wheels
    max_name_len = max(len(f.name) for f in new_contents)
ValueError: max() arg is an empty sequence

This should work on basically any project / build identifier.

@henryiii
Copy link
Contributor

I believe that’s because the build plan is empty and it’s being fixed in #1086.

@henryiii
Copy link
Contributor

Though I don’t know why it happens on the second run, we haven’t thought about multiple runs that much, as the original target was CI.

@joerick
Copy link
Contributor

joerick commented Apr 22, 2022

Fixed by #1086. I think that the second run failed because the wheel was already present (as checked in print_new_wheels by name and filesize). Perhaps that check should also include modification date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants