setuptools_scm icon indicating copy to clipboard operation
setuptools_scm copied to clipboard

Windows path compare fails inside git repo

Open spoorcc opened this issue 2 years ago • 1 comments
trafficstars

On Windows, when installing something from a cwd that is cased differently than the git repo the following assertion fails:

https://github.com/pypa/setuptools_scm/blob/e9cbb5a68b3ae6d5c549bda293ef60bb5ec8ec7e/src/setuptools_scm/_file_finders/git.py#L40

Similar to #89 (see https://github.com/pypa/setuptools_scm/issues/89#issuecomment-225456801 )

  • Given a git project in my_repo on Windows
  • And some path my_repo/CasedDir with a pyproject.toml
  • And you navigate there using lowercase: cd my_repo/caseddir
  • And cwd will be my_repo/caseddir
  • When you build something python -m build
  • Then the assert will fail

spoorcc avatar Jul 19 '23 15:07 spoorcc

thanks for bringing this to attention i think this needs a new testcase for non-normalized paths (both windows and osx)

RonnyPfannschmidt avatar Jul 19 '23 16:07 RonnyPfannschmidt