Skip to content

Hangs on Windows #399

@TheTripleV

Description

@TheTripleV

When using setuptools_scm on Windows, builds hang and don't proceed. This occurs because of the proc.wait() in def _git_ls_files_and_dirs in file_finder_git.py. After _git_interpret_archive returns, the call to proc.wait() never returns. This is because the stdout of the process is not empty. It is filled with a bunch of \x00 bytes.

Solutions that seem to work:

  1. Change proc.wait() to proc.terminate() or proc.kill()
  2. Before calling proc.wait() call proc.stdout.close() to close the open fd.
  3. Before calling proc.wait() call proc.stdout.read() to read out the fd.

Tested while building robotpy/robotpy-wpilib. setuptools_scm==3.3.3 works but the latest release does not.

Output of python setup.py develop when the hang occurs:

running develop
running egg_info
writing wpilib.egg-info\PKG-INFO
writing dependency_links to wpilib.egg-info\dependency_links.txt  
writing entry points to wpilib.egg-info\entry_points.txt
writing requirements to wpilib.egg-info\requires.txt
writing top-level names to wpilib.egg-info\top_level.txt

Data in proc.stdout after _git_interpret_archive returns:
\x00\x00\x00... (9728 null bytes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions