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

Remove uv as a direct dependency #299

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Conversation

antoinebrl
Copy link
Contributor

@antoinebrl antoinebrl commented Jan 22, 2025

This mimics how other package managers are operated, that is by assuming they are installed by the user and available via the PATH environment variable. This will also reduce potential mismatches between the different installed versions.

Stacked on #297

@antoinebrl antoinebrl changed the title Remove uv as a direct dependency Draft: Remove uv as a direct dependency Jan 22, 2025
@antoinebrl antoinebrl changed the title Draft: Remove uv as a direct dependency WIP: Remove uv as a direct dependency Jan 22, 2025
@antoinebrl antoinebrl marked this pull request as draft January 22, 2025 16:05
@antoinebrl antoinebrl changed the title WIP: Remove uv as a direct dependency Remove uv as a direct dependency Jan 22, 2025
Copy link
Contributor

@vsiles vsiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall happy with the MR but can we document this behavior to make it easily discoverable ? Something like "kraken is using uv from the $PATH. If you use a custom uv, make sure it is available in there"

@antoinebrl antoinebrl self-assigned this Jan 22, 2025
Comment on lines +296 to +303
try:
response = sp.check_output(command, cwd=self.project_directory, env=environ).decode().strip()
except sp.CalledProcessError as exc:
if exc.returncode != 1:
raise
return None
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find that the management of the error and returned value between this block and the parent function get_path is a bit weird. However, this is inspired by the PoetryManagedEnvironment and PdmManagedEnvironment so I went this this approach for consistency.

@antoinebrl antoinebrl force-pushed the ab/uv-not-direct-dep branch from b70189b to 4b825c7 Compare January 22, 2025 16:22
@antoinebrl
Copy link
Contributor Author

Overall happy with the MR but can we document this behavior to make it easily discoverable ? Something like "kraken is using uv from the $PATH. If you use a custom uv, make sure it is available in there"

@vsiles , I added a note in the documentation based on your suggestion. Let me know what you think.

@antoinebrl antoinebrl force-pushed the ab/uv-project-manager branch 3 times, most recently from 7c5a5d5 to 36017a1 Compare January 22, 2025 18:54
@antoinebrl antoinebrl force-pushed the ab/uv-not-direct-dep branch from 4b825c7 to f6ce255 Compare January 22, 2025 18:56
Base automatically changed from ab/uv-project-manager to develop January 22, 2025 19:14
@antoinebrl antoinebrl force-pushed the ab/uv-not-direct-dep branch from f6ce255 to 9efe461 Compare January 22, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants