Skip to content

Fixed uv build#158

Merged
malmeloo merged 1 commit intomalmeloo:mainfrom
franga2000:main
Aug 5, 2025
Merged

Fixed uv build#158
malmeloo merged 1 commit intomalmeloo:mainfrom
franga2000:main

Conversation

@franga2000
Copy link
Contributor

uv build was producing an empty wheel when building from Git (only included the metadata and no code), meaning the package couldn't be used. Somehow, a regular pip install git+ worked...

I've never seen py-modules used, but judging by the docs, it's not the completely correct solution here. packages is the usual way of whitelisting what to include and it seems to fix the issue.

Reproducible example:

$ uv init
Initialized project `tmp`

$ uv add git+https://github.com/malmeloo/FindMy.py
Resolved 61 packages in 2ms
Audited 28 packages in 0.20ms

$ uv run python -c 'import findmy; print(findmy)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import findmy; print(findmy)
    ^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'findmy'

After the fix:

$ uv init
Initialized project `tmp2`

$ uv add git+https://github.com/franga2000/FindMy.py
Resolved 61 packages in 131ms
Audited 28 packages in 0.12ms

$ uv run python -c 'import findmy; print(findmy)'
<module 'findmy' from '.venv/lib/python3.13/site-packages/findmy/__init__.py'>

*PS: Thanks for this amazing library! I'm working on a little

@malmeloo
Copy link
Owner

malmeloo commented Aug 5, 2025

Thanks! Setuptools was detecting other directories as packages before, and the error message said to include that. Guess I should've done a bit more research before including that line 😅

@malmeloo malmeloo merged commit c0ab486 into malmeloo:main Aug 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants