-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
requires-plugins
breaks poetry installation on Windows
#10028
Comments
This is likely a Windows file path issue like when the drive is a link and Can you provide full logs with |
I face the same problems on GitHub Actions workflow (where I don't fully control the environment). I tried to add
My error is basically the same:
Workflow definition: https://github.com/scikit-fingerprints/scikit-fingerprints/blob/eaa1499a12db49e128808f920df61d8004ef396e/.github/workflows/python-publish.yml. Full stacktrace with |
Thank you @j-adamczyk this is helpful. I can confirm the issue is as I suspected. I am not entirely sure if this is something Poetry can fix as the failure is due to the way action runner sets up the mounts (for the user data directory). Might be able to make the code resilient to that, lets see. |
Could you use |
Probably, will have to check the impacted code first, I also would like to know if there are other places where we might be exposed to this issue. |
Here's a full stack trace from a recent GA run on windows:
|
In the past several other projects hit the issue as well, which was solved, e.g. here https://github.com/Lightning-AI/pytorch-lightning/pull/16164/files, by special-casing os.relpath on windows. |
We are having the same problem with our Windows runners on Github Actions while attempting to upgrade to Poetry 2.x. The plugin we are trying to use is poetry-dynamic-versioning. We're using the latest version of poetry (2.1.1) and poetry-dynamic-versioning (1.7.1). We have two different configurations, running python 3.9 and 3.12 respectively. Same error in each case. Same error message that others have reported:
Please advise - what is the officially suggested solution / workaround? It is not clear to me from the thread on this ticket. This is blocking our migration to Poetry 2.x. Thank you! |
Especially in CI, you can work around this issue by just installing the required plugins explicitly instead of relying on |
Well that worked. Thank you! But it makes me kind of sad, because proper management of plugin dependencies is one of the improvements in Poetry 2.x that I was excited about. I hope that the poetry team is able to prioritize a fix for this. Thanks again for your help,
|
Description
I have a poetry project, which I install and test on Windows machine in GitHub Actions.
Recently, I tried using the new
requires-plugins
feature forpoethepoet
andpoetry-plugin-export
plugins installation.The
pyproject.toml
file looks somewhat like this:However, instead of expected installation, what I receive is an error:
Workarounds
The plugins still can be installed traditionally, using
poetry self add ...
.However, I still would like to try the new feature... it works on Linux so nice!
Poetry Installation Method
pip
Operating System
windiws-latest
(that isWindows Server 2022 OS Version: 10.0.20348 Build 2966
)Poetry Version
Poetry (version 2.0.1)
Poetry Configuration
Python Sysconfig
sysconfig.log
Platform: "win-amd64"
Python version: "3.10"
Current installation scheme: "nt"
Paths:
data = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
include = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Include"
platinclude = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Include"
platlib = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Lib\site-packages"
platstdlib = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Lib"
purelib = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Lib\site-packages"
scripts = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Scripts"
stdlib = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Lib"
Variables:
BINDIR = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
BINLIBDEST = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Lib"
EXE = ".exe"
EXT_SUFFIX = ".cp310-win_amd64.pyd"
INCLUDEPY = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Include"
LIBDEST = "C:\hostedtoolcache\windows\Python\3.10.11\x64\Lib"
SO = ".cp310-win_amd64.pyd"
TZPATH = ""
VERSION = "310"
abiflags = ""
base = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
exec_prefix = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
installed_base = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
installed_platbase = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
platbase = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
platlibdir = "lib"
prefix = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
projectbase = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
py_version = "3.10.11"
py_version_nodot = "310"
py_version_nodot_plat = "310"
py_version_short = "3.10"
srcdir = "C:\hostedtoolcache\windows\Python\3.10.11\x64"
userbase = "C:\Users\runneradmin\AppData\Roaming\Python"
Example pyproject.toml
Poetry Runtime Logs
poetry-runtime.log
output.txt
The text was updated successfully, but these errors were encountered: