This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: sdist fails with symbolic links do non-existing files
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.3, Python 2.7
Status: closed Resolution: duplicate
Dependencies: Superseder: distutils.filelist.findall() fails on broken symlink in Py2.x
View: 12885
Assigned To: Nosy List: cheryl.sabella, dstufft, eric.araujo, jgosmann
Priority: normal Keywords:

Created on 2014-04-21 00:31 by jgosmann, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg216930 - (view) Author: Jan Gosmann (jgosmann) * Date: 2014-04-21 00:31
If there is a symbolic link to a non-existing file anywhere in the source tree "python sdist" fails with an output like the following:

    running sdist
    running check
    warning: check: missing required meta-data: url

    error: abc: No such file or directory

Pruning the problematic path with a file does not help.

I could locate the culprit in <> in line 267:

            stat = os.stat(fullname)

fails for symlinks to non-existing files. Maybe os.lstat should be used? Or it should be checked before os.stat if it is a symlink to a nonexisting file?

In case you wonder why I have links to non-existing files in my source tree: Those can be left behind by automated tests I'm using and are not supposed to be part of the source (or any other) distribution. But as I said, the error is not prevented by excluding them with a file. My current workaround is to delete all the leftovers from the test as first thing in
msg339862 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-04-10 13:40
This was fixed under issue 12885.
Date User Action Args
2022-04-11 14:58:02adminsetgithub: 65517
2019-04-10 13:40:21cheryl.sabellasetstatus: open -> closed

superseder: distutils.filelist.findall() fails on broken symlink in Py2.x

nosy: + cheryl.sabella
messages: + msg339862
resolution: duplicate
stage: resolved
2014-04-21 00:31:06jgosmanncreate