koxudaxi / poetry-pycharm-plugin

A PyCharm plugin for poetry
https://koxudaxi.github.io/poetry-pycharm-plugin/
Apache License 2.0
180 stars 14 forks source link

Packages with environment markers are not parsed correctly #247

Open caniko opened 3 years ago

caniko commented 3 years ago

Describe the bug The bpy package is configured with different versions depending on the current OS:

bpy = [
    {"version" = "^2.91a0", markers="sys_platform!='win32'"},
    {"version" = "^2.82.1", markers="sys_platform=='win32'"}
]

The plugin doesn't recognize the markers, and PyCharm, thereby, believes that I have the wrong version installed: image

To Reproduce Add a package to pyproject.toml with the same method as mentioned above PyCharm should react if your current version isn't the 1st one on the list.

Expected behavior The plugin should iterate through the markers (there can be multiple per entry), and figure out the correct version before alarming the user of the improper version being installed.

Environments (please complete the following information):

koxudaxi commented 3 years ago

@caniko Thank you for creating this issue. I guess the plugin could not parse a in "^2.91a0" I will fix it.