Update upgrade.sh to support using uv #19706
Replies: 3 comments
-
Thanks for the request, @hblandford . However, as a project we only have so much bandwidth to maintain hosting implementation details like this and we have to choose carefully what to include. I'm going to convert this issue to a discussion, in case someone else in the community can provide some details to help you come up with a solution that works for you. |
Beta Was this translation helpful? Give feedback.
-
It might be worth looking at the implementation of |
Beta Was this translation helpful? Give feedback.
-
Hi, I was happy to do this. I have mostly done it. However, I thought you had to raise as a feature before you submit a PR. Only question I had was if it was an issue for the virtual environment to be owned by the netbox user or if it should be owned by root. Happy to start again if that is appropriate. Hugh |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
NetBox version
v4.3.2
Feature type
New functionality
Proposed functionality
Update the upgrade.sh script to check for the presence of Astral's uv program. If found, it would use uv to create the virtual environment rather than pip.
I would appreciate some guidance on the following.
The default venv directory is /opt/netbox/venv. By default uv would use /opt/netbox/.venv.
I have originally done the work to keep using /opt/netbox/venv via an environment variable, but if using uv, would it be better/acceptable to use /opt/netbox/.venv. Not sure whether this would have any flow on effects to elsewhere in netbox.
If accepted, I am happy to take this on.
Use case
If uv is detected on the path of the user, it would us uv to create the virtual environment for the user rather than pip.
Database changes
NA
External dependencies
Does not require any external dependencies, will just use uv to manage the virtual environment if detected.
Beta Was this translation helpful? Give feedback.
All reactions