[issue20705] distutils.extension.Extension with empty 'sources' list

2021-02-03 Thread Steve Dower


Steve Dower  added the comment:

Distutils is now deprecated (see PEP 632) and all tagged issues are being 
closed. From now until removal, only release blocking issues will be considered 
for distutils.

If this issue does not relate to distutils, please remove the component and 
reopen it. If you believe it still requires a fix, most likely the issue should 
be re-reported at https://github.com/pypa/setuptools

--
nosy: +steve.dower
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20705] distutils.extension.Extension with empty 'sources' list

2014-02-20 Thread Rémi Rampin

New submission from Rémi Rampin:

While this is obviously a programming error, distutils currently has no check 
for the 'sources' list being empty, which might or might not result in a 
self-explanatory error message once the CCompiler's link() method is called 
(the exact error depends on the subclass's implementation).

It seems that some code had been put in initially to handle this case ('objects 
or []' constructs) but this has been broken since (objects[0] used by most 
subclasses).

Since objects can only be empty if sources was empty, I think catching this 
case in build_extension() (only caller of link_shared_object) makes sense.

Trivial patch attached, should apply on all versions.

--
components: Distutils
files: distutils-catch-empty-sources.diff
keywords: patch
messages: 211743
nosy: remram
priority: normal
severity: normal
status: open
title: distutils.extension.Extension with empty 'sources' list
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file34154/distutils-catch-empty-sources.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20705
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com