Skip to content

Symlinks don't work right on Windows #1175

Closed
@gvanrossum

Description

@gvanrossum

As noted in #1173, git does not support symlinks on Windows. This means that our use of symlinks in typeshed (admittedly pretty limited) is entirely broken on Windows, since a symlink just shows up as a plain text file on Windows whose contents is the name of the file to which it points.

See http://stackoverflow.com/questions/5917249/git-symlinks-in-windows for more info.

AFAIK there are two ways out:

  1. Get rid of all symlinks in favor of copies -- but then there's the risk of divergence (e.g. between stdlib/3.4/enum.pyi and third_party/3/enum.pi).

  2. Write a post-checkout script that runs on Windows and detects symlinks and replaces them with the contents of the referenced file (see stackoverflow above for more details).

Note that while this problem doesn't appear in current tests, it has caused AppVeyor tests to fail (e.g. https://ci.appveyor.com/project/gvanrossum/mypy/build/1.0.1171/job/eyt2lvjrs2sq8njv) and there are several files in the Windows-specific wheel files on PyPI that are indeed just little text files like described above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions