-
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
PackageInfo: Invalid constraint sys-platform (=="win32") when installing kivy
#3629
Comments
kivy
OK I've narrowed it down. The offending file (at lest for path installs, see below) seems to be ...
[options.extras_require]
tuio = oscpy
...
full =
pillow
docutils
...
gstreamer = kivy_deps.gstreamer~=0.3.1; sys_platform == "win32"
angle = kivy_deps.angle~=0.3.0; sys_platform == "win32"
sdl2 = kivy_deps.sdl2~=0.3.1; sys_platform == "win32"
glew = kivy_deps.glew~=0.3.0; sys_platform == "win32"
[flake8]
...
gstreamer =
kivy_deps.gstreamer~=0.3.1; sys_platform == "win32"
angle =
kivy_deps.angle~=0.3.0; sys_platform == "win32"
sdl2 =
kivy_deps.sdl2~=0.3.1; sys_platform == "win32"
glew =
kivy_deps.glew~=0.3.0; sys_platform == "win32" After reading the docs, I'm still not sure as to whether this is a poetry issue parsing said file, or the file itself is the one with problems |
I've done the following:
By doing this:
So, I guess its an issue with Kivy's I guess things like these are the motivation for warning instead of raising? I would still prefer a raise and have to manually opt-in to ignoring, either via cli or env var. Would you accept a pr for something like that? |
Isn't it a setuptools issue, then? |
I really cant make my mind just by reading the specs. Its not a poetry issue, though... except for the fact that it did not raise! |
Would the maintainers care about the |
I'm also having this issue when adding Kivy 2.0 via Poetry. As this appears to be an issue with Kivy, does a new issue need to be opened in their repo, or have changes already been made that should fix this issue? |
The kivy code had a misinterpretation from the (interpretable) setuptools documentation at the time. The setuptools documentation has been fixed and merged. See pypa/setuptools#2561 According to this, The issue should still be happening. However, I tried to reproduce the issue in docker yesterday (both x86 and arm) but couldn't, so maybe it has been fixed elsewhere? The following allows to install kivy via poetry, in both scenarios:
# command on host
docker build -t tmp . && docker run --rm -it tmp And on the container:
|
Given that this issue seems like it will be fixed in the next release, I'll hold off further troubleshooting until Kivy 2.1 is released. Though, for what it's worth, here's some system info / logs: System Info
LogsCreating a new Poetry project with KivyNew Project PS C:\Users\Andrew\Code> poetry new kivy-test
Created package kivy_test in kivy-test
PS C:\Users\Andrew\Code> cd kivy-test Adding Kivy PS C:\Users\Andrew\Code\kivy-test> poetry add kivy
Creating virtualenv kivy-test in C:\Users\Andrew\Code\kivy-test\.venv
Using version ^2.0.0 for Kivy
Updating dependencies
Resolving dependencies...
PackageInfo: Invalid constraint (sys-platform (=="win32") ; extra == 'angle') found in kivy-2.0.0 dependencies, skipping
<debug>PackageInfo:</debug> Invalid constraint (sys-platform (=="win32") ; extra == 'angle') found in kivy-2.0.0 dependencies, skipping
PackageInfo: Invalid constraint (sys-platform (=="win32") ; extra == 'glew') found in kivy-2.0.0 dependencies, skipping
<debug>PackageInfo:</debug> Invalid constraint (sys-platform (=="win32") ; extra == 'glew') found in kivy-2.0.0 dependencies, skipping
PackageInfo: Invalid constraint (sys-platform (=="win32") ; extra == 'gstreamer') found in kivy-2.0.0 dependencies, skipping
<debug>PackageInfo:</debug> Invalid constraint (sys-platform (=="win32") ; extra == 'gstreamer') found in kivy-2.0.0 dependencies, skipping
PackageInfo: Invalid constraint (sys-platform (=="win32") ; extra == 'sdl2') found in kivy-2.0.0 dependencies, skipping
<debug>PackageInfo:</debug> Invalid constraint (sys-platform (=="win32") ; extra == 'sdl2') found in kivy-2.0.0 dependencies, skipping
Writing lock file
Package operations: 24 installs, 0 updates, 0 removals
• Installing certifi (2021.5.30)
• Installing charset-normalizer (2.0.4)
• Installing idna (3.2)
• Installing urllib3 (1.26.6)
• Installing pyparsing (2.4.7)
• Installing pywin32 (301)
• Installing requests (2.26.0)
• Installing atomicwrites (1.4.0)
• Installing attrs (21.2.0)
• Installing colorama (0.4.4)
• Installing kivy-deps.glew (0.3.0)
• Installing kivy-deps.sdl2 (0.3.1)
• Installing kivy-deps.angle (0.3.0)
• Installing docutils (0.17.1)
• Installing more-itertools (8.8.0)
• Installing packaging (21.0)
• Installing pluggy (0.13.1)
• Installing wcwidth (0.2.5)
• Installing kivy-garden (0.1.4)
• Installing pypiwin32 (223)
• Installing py (1.10.0)
• Installing pygments (2.10.0)
• Installing kivy (2.0.0)
• Installing pytest (5.4.3) Adding another library (ex. Numpy) PS C:\Users\Andrew\Code\kivy-test> poetry add numpy
Using version ^1.21.2 for numpy
Updating dependencies
Resolving dependencies...
PackageInfo: Invalid constraint (sys-platform (=="win32") ; extra == 'angle') found in kivy-2.0.0 dependencies, skipping
PackageInfo: Invalid constraint (sys-platform (=="win32") ; extra == 'glew') found in kivy-2.0.0 dependencies, skipping
PackageInfo: Invalid constraint (sys-platform (=="win32") ; extra == 'gstreamer') found in kivy-2.0.0 dependencies, skipping
PackageInfo: Invalid constraint (sys-platform (=="win32") ; extra == 'sdl2') found in kivy-2.0.0 dependencies, skipping
Writing lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing numpy (1.21.2) Pyproject.toml [tool.poetry]
name = "kivy-test"
version = "0.1.0"
description = ""
authors = ["Andrew Glick <[email protected]>"]
[tool.poetry.dependencies]
python = "~3.9"
Kivy = "^2.0.0"
numpy = "^1.21.2"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" |
I had these "Invalid constraint" messages with Kivy 2.0, but updating to Kivy 2.1 fixed this issue for me. System Info
|
Now that kivy/kivy#7362 has been merged in a full release with Kivy 2.1, I believe we can close this issue. |
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. |
-vvv
option).Issue
Im having some trouble with
poetry
+kivy
(2.2.0, from wheels and github) for linux (elementary on x64, jetpack on armv8, same issue):<debug>PackageInfo:</debug>
poetry.lock
contains the "problematic" sub-depspoetry export
generates apip -r
installable file, at least for linux...The constraints from poetry output
Thats the only thing (
python 3.9
orpython3.6.9
,Poetry version 1.1.4
):snippet to reproduce
pyproject.toml
resulting file contents
:The problem seems to happen at
poetry.inspection.info
:PackageInfo.from_metadata
creates thepkginfo.Wheel(directory.as_posix())
ok, but the metadata contains unparsable stuff (attached in the log snippet above)Additional INFO:
The wheel contains this as METADATA:
These lines from the
wheel/dist.info
look weird:Specially,
poetry
does thispoetry/poetry/inspection/info.py
Line 177 in 8312e3f
poetry code
kivy
from2.0.0
, erased allwin32
references andpoetry add
ed from the git fork: the issue goes away, so probably it has something to do with thos three files.The text was updated successfully, but these errors were encountered: