poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Cannot install package from git on Windows if repository contains symlinks

Open bruchar1 opened this issue 3 years ago • 6 comments

poetry add git+https://github.com/mesonbuild/meson.git does not work on Windows, because it tries to create a symlink.

However, I can git clone this repository with no problems, and I can install it with pip with no problems (pip install git+https://github.com/mesonbuild/meson.git).

This was reported in #6246. However, I do think this is a poetry bug, since pip can manage it with no problems.

bruchar1 avatar Apr 14 '23 12:04 bruchar1

you didn't provide output, so no-one can see what the problem is.

If this is truly a duplicate of #6246 then it can be closed for the same reasons that one is closed, TLDR being that if a fix can be made it must be made in dulwich so please raise the issue there.

dimbleby avatar Apr 14 '23 13:04 dimbleby

λ poetry add git+https://github.com/mesonbuild/meson.git Creating virtualenv mt-fT1b7t6V-py3.10 in C:\Users\charles.brunet\AppData\Local\pypoetry\Cache\virtualenvs

[WinError 1314] Le client ne dispose pas d’un privilège nécessaire: '../Cellar/boost/0.3.0/include/boost' -> 'C:\Users\charles.brunet\AppData\Local\pypoetry\Cache\virtualenvs\mt-fT1b7t6V-py3.10\src\meson\test cases\frameworks\35 boost symlinks\boost\include\boost'

The message is in French, but it means: "Client has no required privileges".

This has nothing to do with dulwich, it is simply a different example of the same symptoms. It cannot be solved in meson repo, because those symlinks are needed for testing.

bruchar1 avatar Apr 14 '23 13:04 bruchar1

It cannot be solved in meson repo

no-one suggested that.

dulwich is poetry's default git client. If you provided output with -vvv as the issue template asks, I expect you would see that this failure is raised from that library.

dimbleby avatar Apr 14 '23 13:04 dimbleby

I'm not a windows person, but i think regular users can't make symlinks on windows, hence the permissions error. What does the git checkout do? make the symlink? resolve it? elide it?

clintonroy avatar Apr 14 '23 13:04 clintonroy

Sorry for the confusion. I didn't realized what dulwich was...

Yes, symlinks on Windows require elevated privileges.

git writes a text file containing the path pointed by the symlink.

bruchar1 avatar Apr 14 '23 13:04 bruchar1

This should be resolved by https://github.com/jelmer/dulwich/pull/1171

jelmer avatar Apr 27 '23 14:04 jelmer

This should be resolved now as the dulwich version has been updated.

abn avatar Nov 16 '24 00:11 abn

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Dec 17 '24 00:12 github-actions[bot]