-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect POSIX-style paths on Windows #415
Comments
at first glance this will require quite a number of back and forth path transformations, its not something that i can hope to build and test (i have neither the env nor the msys expertise, plus i use linux) you can use the |
What about an msys git with an msys python (which also has the path mismatch problem)? Is that something you'd consider supporting? If you don't support this configuration, my workaround is probably better suited as a patch for MINGW-packages, and that you only explicitly support a windows git with a windows python. |
im not sure whats the best approach there if msys python uses windows paths instead of msys paths that sounds like a bug in msys python the problem with supporting the configuration you mention is that i do not use windows or msys at all so right now msys is not a system/setup i can support by myself, it needs help by someone using those systems and knowing them |
@cr1901 we are trying to build wheels using msys2. We are seeing the exact same path issue you report. I've forked setuptools_scm and applied your patch. How did you replace setuptools_scm from msys2 with the forked version? Thanks! |
@wjblanke According to
Meaning I did the following from my
|
Thanks @cr1901! We were able to get it to run in the toml with requires = ["setuptools_scm@git+https://github.com/Chia-Network/setuptools_scm.git@master#egg=setuptools_scm", "setuptools>=42", "wheel", "setuptools_scm[toml]>=3.5.0"] Unfortunately it doesn't look like pypi accepts mingw wheels. HTTPError: 400 Client Error: Binary wheel 'chiapos-0.0.0-cp38-cp38-mingw.whl' has an unsupported platform tag 'mingw'. for url: https://test.pypi.org/legacy/ |
@wjblanke I'm guessing "mingw" is explicitly for packages that are part of the MSYS2 Project, and you otherwise have to use
|
personally i wont work on this as i dont have the system needed, im happy to review pr's with tests i wonder if a gitlab ci build could be added with such a environment to ensure its not breaking until someone comes up with a working co it cant be declared a supported feature |
@RonnyPfannschmidt Sorry, I wasn't expecting you to fix this, especially if you don't have the requisite system. I've been trying to tie up a bunch of loose ends, and I haven't gotten around to adding a fix to this. Calling a binary to do parsing is a horrible approach. In the past I've used
I will take a look, though it may be a few days. You have a
Working checkout? |
Whops, I meant ci for continuous integration |
Same issue! in MSYS2: when i install dependencies by
|
We've patched this now in MSYS2 by calling git in a way so it outputs relative paths: https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-python-setuptools-scm/0001-git-Use-show-prefix-instead-of-show-toplevel-for-fin.patch If this is something that's considered acceptable I can try to upstream it. |
Can you open a pr for more detailed discussion I believe it looks okish enough |
This should fix Cygwin type git which will return posix path when `git rev-parse --show-toplevel` is called which isn't parsed properly. This call `git rev-parse --show-prefix` which return relative paths which is later parsed. Fixes pypa#415
this takes the idea from https://github.com/msys2/MINGW-packages/blob/bf4d6f85053b66db09977ecffac0c1b3db735a0f/mingw-w64-python-setuptools-scm/0001-git-Use-show-prefix-instead-of-show-toplevel-for-fin.patch and simplified the logic additionally msys2 testing is added Fixes #415
I have a
git
binary installed on Windows (the MSYS2 variant, specifically) that does not understand Windows-style paths. When trying to install software usingsetuptools_scm
, this leads to cryptic errors such as the following:The error comes from the path
git
returns from therev-parse
command:One potential solution is to pipe the output of
git rev-parse
throughcygpath
is we detect that thegit
being run is MSYS2 (or otherwise doesn't understand Windows-style paths), as unfortunately conversion between POSIX and Windows path is an involved problem:The following workaround allows me to successfully run the
egg-info
,develop
, andinstall
successfully (withwarning: no previously-included files found matching '.travis.yaml'
). Obviously this patch isn't acceptable as-is, and this may not be the correct repo to bring this issue up, depending on the scope of supportedgit
variants. However, I figure it's worth a shot.The text was updated successfully, but these errors were encountered: