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

Missing files after uv pip install #5315

Closed
rnarma321 opened this issue Jul 22, 2024 · 8 comments
Closed

Missing files after uv pip install #5315

rnarma321 opened this issue Jul 22, 2024 · 8 comments
Labels
external The problem is with another package or dependency (not uv)

Comments

@rnarma321
Copy link

Command: uv pip install kivymd==1.1.1
This package should have .kv files inside of it, but when i use uv pip install vs pip install they are missing.
There are no issues popped up during the install, even in verbose mode

The tar.gz is pulls from has these files, I checked manually, Im not exactly sure what is causing this, but I tried across two version 0.2.27 and 0.2.0, along with two different OSs with mac and debian 12 bookworm and got the same results with every combination.

DEBUG Found fresh response for: https://pypi.org/simple/kivymd/
DEBUG Searching for a compatible version of kivymd (==1.1.1)
DEBUG Selecting: kivymd==1.1.1 (kivymd-1.1.1.tar.gz)
DEBUG Trying to lock if free: /Users/roshan/Library/Caches/uv/built-wheels-v3/pypi/kivymd/1.1.1/.lock
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/35/55/d979644cdc9070a9611ab023db986aa0d540fc8f5fdd2c0f49eaef558751/kivymd-1.1.1.tar.gz
DEBUG Using cached metadata for: kivymd==1.1.1
DEBUG Adding transitive dependency for kivymd==1.1.1: kivy>=2.0.0
DEBUG Adding transitive dependency for kivymd==1.1.1: pillow* ````

@charliermarsh
Copy link
Member

Where are those files supposed to be exactly?

@rnarma321
Copy link
Author

an example can be found under .venv/lib/python3.10/site-packages/kivymd/uix/button/button.kv. This file will exist under pip but never showed up with uv pip

@zanieb
Copy link
Member

zanieb commented Jul 22, 2024

For reference, this is included in the package_data: https://github.com/kivymd/KivyMD/blob/b5bc79fb71312868be86580b7b32f676926ceb80/setup.py#L102

@rnarma321
Copy link
Author

So actually that is interesting, it doesn't have the .pot files or the .po files. But it seems to have the .ttf files and the .pngs. Maybe something about the pathing it generates from the "glob_paths" function it calls breaks with uv but not with pip

@charliermarsh
Copy link
Member

Do you see any more consistency when you run pip install --use-pep517, and compare that to uv?

@rnarma321
Copy link
Author

Nope, the pip install using pep517 flag still gives the .kv files, unlike uv which is missing it

@charliermarsh
Copy link
Member

Ok, I figured this out. Their setup.py assumes that there is no directory named kivymd in the path apart from the one at the top-level. But in our cache, we nest the build under a directory called kivymd

E.g., here's one path in the cache: Users/crmarsh/workspace/uv/foo/built-wheels-v3/pypi/kivymd/1.1.1/_kyEDLdSRqebDVYQM_lQA/kivymd-1.1.1.tar.gz/kivymd/uix/textfield/textfield.kv

So it's truncating at the first kivymd.

I consider this a bug in the package itself, it's effectively not relocatable. I think they need to change out_files.append(filepath.split(f"kivymd{os.sep}")[1]) to out_files.append(filepath.split(f"kivymd{os.sep}")[-1]) in the setup.py.

@charliermarsh
Copy link
Member

I created an issue here: kivymd/KivyMD#1722

@charliermarsh charliermarsh added the external The problem is with another package or dependency (not uv) label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external The problem is with another package or dependency (not uv)
Projects
None yet
Development

No branches or pull requests

3 participants