-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support for uv.sources #151
Comments
PR welcome... but I don't plan adding this myself. |
I am interested in this feature and am happy to contribute but I think I could use some architectural debate/guidance. To me it appears that root cause here is that
in separate stages, as opposed to doing a singular Coalescing into a single install stage/command would probably be very involved brain-surgery and probably break the Ideally I'd be able to force-feed a cc @charliermarsh in case there is a more elegant way of going about this |
IMHO this is the path ahead. |
Assuming you meant the former, this is interesting and I didn't expect that to be your preference! It does make things easier, but means that there will be lots of no-op stages i.e. TBH this isn't unique to |
Overriding those steps with no-ops is fine and the expected decision. |
I give this a try: tox install dependencies at the very begining of venv creation, at https://github.com/tox-dev/tox/blob/main/src/tox/tox_env/python/runner.py#L97-L115 . So for now I can only think of calling |
You're looking in the wrong codebase. All the uv stuff is in this repository. |
Right. I only referenced tox because most metheds here is not orerrided in tox-ux. Anyway I created mrmathematica@2adbc00 that aims to demo doing a singular |
Well depends, the lock run environment doesn't inherit from Python e.g. https://github.com/tox-dev/tox-uv/blob/main/src/tox_uv/_run_lock.py#L19 so does not apply. For the non lock variant while we do extend from the Python https://github.com/tox-dev/tox-uv/blob/main/src/tox_uv/_run.py#L15, we do override the installer https://github.com/tox-dev/tox-uv/blob/main/src/tox_uv/_venv.py#L110 so the pip installer does not apply in either case that you linked. Not sure what you're trying to do in that commit, makes no sense to me 🤔 Perhaps take a step back and first explain what problem you are trying to solve, what functionality change you're proposing for it, before you start implementation. |
OK. I debug a few https://github.com/tox-dev/tox/blob/main/src/tox/tox_env/python/runner.py#L99-L100 these two function calls install package dependencies and dependency_groups at venv creation. https://github.com/tox-dev/tox/blob/main/src/tox/tox_env/python/pip/pip_install.py#L227 this function is actually called to execute Neither function is overrided in tox-uv. So I was trying to call |
This. Step away from the code and focus on high level functionality first. |
What's the problem this feature will solve?
Resolve dependencies from non pypi sources like GitHub repos.
Describe the solution you'd like
Use uv's project dependency resolution. If a dependency has been declared in [tool.uv.project] resolve from that source instead of pypi (name colition)
The text was updated successfully, but these errors were encountered: