Skip to content

Commit

Permalink
Python: small makefile update for python (#9847)
Browse files Browse the repository at this point in the history
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Small fix in the makefile for when uv is not installed.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
  • Loading branch information
eavanvalkenburg authored Nov 29, 2024
1 parent d8496da commit 592b138
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@ install:
make install-sk
make install-pre-commit

UV_VERSION = $(shell uv --version 2> /dev/null)
UV_VERSION := $(shell command -v uv 2> /dev/null)
install-uv:
# Check if uv is installed
ifdef UV_VERSION
echo "uv found $(UV_VERSION)"
echo "running uv update"
uv self update
else
ifndef UV_VERSION
echo "uv could not be found"
echo "Installing uv"
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "uv installed"
echo "Please restart your shell."
exit 1
else
echo "uv found $(UV_VERSION)"
echo "running uv update"
uv self update
endif

.ONESHELL:
Expand Down

0 comments on commit 592b138

Please sign in to comment.