Skip to content
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

Incorrect locking of platform-specific wheel dependencies #4810

Closed
3 tasks done
ghost opened this issue Nov 22, 2021 · 3 comments · Fixed by #5715
Closed
3 tasks done

Incorrect locking of platform-specific wheel dependencies #4810

ghost opened this issue Nov 22, 2021 · 3 comments · Fixed by #5715
Labels
kind/bug Something isn't working as expected

Comments

@ghost
Copy link

ghost commented Nov 22, 2021

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

When given the above pyproject.toml file, running poetry lock on Linux generates the following poetry.lock:

[[package]]                                      
name = "test"                                  
version = "1.0"                                  
description = ""                                 
category = "main"                                
optional = false                                 
python-versions = "*"                            
                                                 
[package.source]                                 
type = "file"                                    
url = "wheels/test-1.0-cp34-abi3-win_amd64.whl"

Also, poetry export outputs:

test @ file:///home/nyuszika7h/example/wheels/test-1.0-cp34-abi3-win_amd64.whl; sys_platform == "win32" or sys_platform == "linux" or sys_platform == "darwin"                               

The expected behavior would be to include 3 separate entries, one for each platform.

Interestingly enough, poetry install is smart enough to pick the correct version for the platform despite the incorrect locking. But the lock file is incomplete, and the requirements.txt output is just completely wrong.

@ghost ghost added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 22, 2021
@ghost
Copy link
Author

ghost commented Nov 27, 2021

If the dependencies are provided as URLs rather than local files, it seems like it's even worse: poetry install actually picks the incorrectly locked Windows version for Linux as well.

@teaVeloper
Copy link

I also have a similar issue with poetry 1.2.0b1 locking some dependencies as windows and creating a requirements.txt mentioning windows, and thus install failed on a system I can only use requirements.txt - poetry 1.1.13 did resolve the same pyproject.toml correctly.

If helpful, I can create an Issue for that with more details.

Copy link

github-actions bot commented Mar 1, 2024

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 github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants