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
Python’s setup.py raises a ValueError when self.extensions is empty #60741
Comments
When disabled_module_list contains all the module names that are not built by Modules/Setup.dist, self.extensions in setup.py will be an empty list and when build_extensions tries to determine the max length of all extension names it raises a ValueError with the following traceback: Traceback (most recent call last):
File "./setup.py", line 2143, in <module>
main()
File "./setup.py", line 2138, in main
'Lib/smtpd.py']
File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/core.py", line 152, in setup
dist.run_commands()
File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "./setup.py", line 282, in build_extensions
longest = max([len(e.name) for e in self.extensions])
ValueError: max() arg is an empty sequence
make: *** [sharedmods] Error 1
|
setup.py patch for 2.7.3 |
setup.py patch for 3.0.1 |
setup.py patch for 3.1.5 |
setup.py patch for 3.2.3 |
setup.py patch for 3.3.0 |
Thanks for the patches. |
LGTM. |
Patch LGTM to me too; someone can probably just commit it. |
New changeset a169ee4f254a by Berker Peksag in branch '3.4': New changeset 491a4d3e2bdd by Berker Peksag in branch 'default': |
New changeset 6946036f21ef by Berker Peksag in branch '2.7': |
Committed. Thanks for the patch, Jonathan! |
You can use the default parameter of max() in 3.4+. |
New changeset 1ef4e3a125bf by Berker Peksag in branch '3.4': New changeset 37d896c3604a by Berker Peksag in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: