
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2012-11-23 01:14 byjhosmer, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| Python-2.6.8-setup.py.patch | jhosmer,2012-11-23 01:15 | setup.py patch for 2.6.8 | ||
| Python-2.7.3-setup.py.patch | jhosmer,2012-11-23 01:16 | setup.py patch for 2.7.3 | ||
| Python-3.0.1-setup.py.patch | jhosmer,2012-11-23 01:16 | setup.py patch for 3.0.1 | ||
| Python-3.1.5-setup.py.patch | jhosmer,2012-11-23 01:16 | setup.py patch for 3.1.5 | ||
| Python-3.2.3-setup.py.patch | jhosmer,2012-11-23 01:17 | setup.py patch for 3.2.3 | ||
| Python-3.3.0-setup.py.patch | jhosmer,2012-11-23 01:17 | setup.py patch for 3.3.0 | ||
| Messages (14) | |||
|---|---|---|---|
| msg176142 -(view) | Author: Jonathan Hosmer (jhosmer)* | Date: 2012-11-23 01:14 | |
When disabled_module_list contains all the module names that are not built byModules/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 sequencemake: *** [sharedmods] Error 1~~~ An example disabled_module_list from setup.py: ~~~disabled_module_list = [# Modules not compatible/not applicable for the iOS'dl', 'nis', 'gdbm', 'spwd', '_bsddb', '_curses', '_tkinter', 'readline', 'bsddb185', 'ossaudiodev', 'sunaudiodev', '_curses_panel', 'linuxaudiodev', # Modules appended to inittab before embedded initialization'_multiprocessing', 'future_builtins', '_ctypes_test', '_testcapi', '_sqlite3', '_hashlib', '_hotshot', '_scproxy', '_pybsddb', 'imageop', '_ctypes', '_lsprof', '_heapq', '_yaml', '_json', 'math', 'zlib', '_io', 'bz2', 'dbm']~~~ ExampleModules/Setup.dist: ~~~DESTLIB=$(LIBDEST)MACHDESTLIB=$(BINLIBDEST)DESTPATH=SITEPATH=TESTPATH=MACHDEPPATH=:plat-$(MACHDEP)EXTRAMACHDEPPATH=TKPATH=:lib-tkOLDPATH=:lib-oldCOREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH)PYTHONPATH=$(COREPYTHONPATH)*static*posix posixmodule.cerrno errnomodule.cpwd pwdmodule.c_sre _sre.c_codecs _codecsmodule.czipimport zipimport.c_symtable symtablemodule.carray arraymodule.ccmath cmathmodule.c _math.c_struct _struct.ctime timemodule.c -lmoperator operator.c_weakref _weakref.c_random _randommodule.c_collections _collectionsmodule.citertools itertoolsmodule.cstrop stropmodule.c_functools _functoolsmodule.c_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.cdatetime datetimemodule.c_bisect _bisectmodule.cunicodedata unicodedata.c_locale _localemodule.cfcntl fcntlmodule.cgrp grpmodule.cselect selectmodule.cmmap mmapmodule.c_csv _csv.c_socket socketmodule.cSSL=/usr/local/OpenSSL_for_iOS_ssl _ssl.c -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl -L$(SSL)/lib -lssl -lcryptocrypt cryptmodule.ctermios termios.cresource resource.caudioop audioop.cimageop imageop.c_md5 md5module.c md5.c_sha shamodule.c_sha256 sha256module.c_sha512 sha512module.ctiming timingmodule.csyslog syslogmodule.cbinascii binascii.cparser parsermodule.ccStringIO cStringIO.ccPickle cPickle.cfpectl fpectlmodule.cfpetest fpetestmodule.cpyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI_multibytecodec cjkcodecs/multibytecodec.c_codecs_cn cjkcodecs/_codecs_cn.c_codecs_hk cjkcodecs/_codecs_hk.c_codecs_iso2022 cjkcodecs/_codecs_iso2022.c_codecs_kr cjkcodecs/_codecs_kr.c_codecs_tw cjkcodecs/_codecs_tw.c_codecs_jp cjkcodecs/_codecs_jp.cxxsubtype xxsubtype.c | |||
| msg176143 -(view) | Author: Jonathan Hosmer (jhosmer)* | Date: 2012-11-23 01:16 | |
setup.py patch for 2.7.3 | |||
| msg176144 -(view) | Author: Jonathan Hosmer (jhosmer)* | Date: 2012-11-23 01:16 | |
setup.py patch for 3.0.1 | |||
| msg176145 -(view) | Author: Jonathan Hosmer (jhosmer)* | Date: 2012-11-23 01:16 | |
setup.py patch for 3.1.5 | |||
| msg176146 -(view) | Author: Jonathan Hosmer (jhosmer)* | Date: 2012-11-23 01:17 | |
setup.py patch for 3.2.3 | |||
| msg176147 -(view) | Author: Jonathan Hosmer (jhosmer)* | Date: 2012-11-23 01:17 | |
setup.py patch for 3.3.0 | |||
| msg176148 -(view) | Author: Ezio Melotti (ezio.melotti)*![]() | Date: 2012-11-23 01:27 | |
Thanks for the patches.3.1 and 2.6 only receive security fixes, and 3.0 is not maintained anymore, so I removed them from the versions. Usually it's enough to upload a single patch, especially if the fix is the same on all branches.The patch should also include tests if possible.Is also not necessary to add a comment when you add a file. | |||
| msg176187 -(view) | Author: Éric Araujo (eric.araujo)*![]() | Date: 2012-11-23 17:13 | |
LGTM. | |||
| msg216194 -(view) | Author: A.M. Kuchling (akuchling)*![]() | Date: 2014-04-14 20:06 | |
Patch LGTM to me too; someone can probably just commit it. | |||
| msg227717 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2014-09-27 19:49 | |
New changeseta169ee4f254a by Berker Peksag in branch '3.4':Issue#16537: Check whether self.extensions is empty in setup.py.https://hg.python.org/cpython/rev/a169ee4f254aNew changeset491a4d3e2bdd by Berker Peksag in branch 'default':Issue#16537: Check whether self.extensions is empty in setup.py.https://hg.python.org/cpython/rev/491a4d3e2bdd | |||
| msg227718 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2014-09-27 19:54 | |
New changeset6946036f21ef by Berker Peksag in branch '2.7':Issue#16537: Check whether self.extensions is empty in setup.py.https://hg.python.org/cpython/rev/6946036f21ef | |||
| msg227719 -(view) | Author: Berker Peksag (berker.peksag)*![]() | Date: 2014-09-27 19:55 | |
Committed. Thanks for the patch, Jonathan! | |||
| msg227752 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2014-09-28 08:22 | |
You can use the default parameter of max() in 3.4+. | |||
| msg228055 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2014-10-01 02:11 | |
New changeset1ef4e3a125bf by Berker Peksag in branch '3.4':Issue#16537: Use the new *default* parameter of max().https://hg.python.org/cpython/rev/1ef4e3a125bfNew changeset37d896c3604a by Berker Peksag in branch 'default':Issue#16537: Use the new *default* parameter of max().https://hg.python.org/cpython/rev/37d896c3604a | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:38 | admin | set | github: 60741 |
| 2021-09-07 18:02:57 | iritkatriel | link | issue19346 superseder |
| 2014-10-01 02:11:45 | python-dev | set | messages: +msg228055 |
| 2014-09-28 08:22:58 | serhiy.storchaka | set | nosy: +serhiy.storchaka messages: +msg227752 |
| 2014-09-27 19:55:49 | berker.peksag | set | status: open -> closed assignee:berker.peksag versions: + Python 3.5, - Python 3.2, Python 3.3 nosy: +berker.peksag messages: +msg227719 resolution: fixed stage: commit review -> resolved |
| 2014-09-27 19:54:59 | python-dev | set | messages: +msg227718 |
| 2014-09-27 19:49:39 | python-dev | set | nosy: +python-dev messages: +msg227717 |
| 2014-04-14 20:06:51 | akuchling | set | nosy: +akuchling messages: +msg216194 stage: patch review -> commit review |
| 2013-01-06 16:42:33 | brett.cannon | set | nosy: +brett.cannon |
| 2013-01-05 06:05:21 | ned.deily | link | issue16867 superseder |
| 2012-11-23 17:13:20 | eric.araujo | set | nosy: +eric.araujo messages: +msg176187 title: setup.py throws a ValueError when self.extensions is empty -> Python’s setup.py raises a ValueError when self.extensions is empty |
| 2012-11-23 01:27:38 | ezio.melotti | set | versions: - Python 2.6, Python 3.1 nosy: +ezio.melotti messages: +msg176148 stage: patch review |
| 2012-11-23 01:17:19 | jhosmer | set | files: +Python-3.3.0-setup.py.patch messages: +msg176147 |
| 2012-11-23 01:17:07 | jhosmer | set | files: +Python-3.2.3-setup.py.patch messages: +msg176146 |
| 2012-11-23 01:16:49 | jhosmer | set | files: +Python-3.1.5-setup.py.patch messages: +msg176145 |
| 2012-11-23 01:16:27 | jhosmer | set | files: +Python-3.0.1-setup.py.patch messages: +msg176144 |
| 2012-11-23 01:16:08 | jhosmer | set | files: +Python-2.7.3-setup.py.patch messages: +msg176143 |
| 2012-11-23 01:15:43 | jhosmer | set | files: +Python-2.6.8-setup.py.patch keywords: +patch |
| 2012-11-23 01:14:17 | jhosmer | create | |