From edab1e33d0c6d9349b91dda30d2bd219ef940f81 Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Thu, 16 May 2024 16:31:30 -0400 Subject: [PATCH] Fix UV install in Makefile (#2421) * Fix UV install in Makefile Signed-off-by: Thomas J. Fan * Fixes failing test Signed-off-by: Thomas J. Fan * Use dev version to be simplier Signed-off-by: Thomas J. Fan * Use v0.8.18 flytectl Signed-off-by: Thomas J. Fan * Adds comment Signed-off-by: Thomas J. Fan * Remove version specification Signed-off-by: Thomas J. Fan * Remove version pin Signed-off-by: Thomas J. Fan * Use pseudo version for integreation tests Signed-off-by: Thomas J. Fan * Use a version that packaging recognizes Signed-off-by: Thomas J. Fan * Remove quotes Signed-off-by: Thomas J. Fan * Set flyteidl version Signed-off-by: Thomas J. Fan * FIX Fixes version more for uv strictness Signed-off-by: Thomas J. Fan --------- Signed-off-by: Thomas J. Fan --- .github/workflows/pythonbuild.yml | 1 + Dockerfile.dev | 17 ++++++++++------- Makefile | 3 ++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pythonbuild.yml b/.github/workflows/pythonbuild.yml index c3aa79c93f..b18cdc229a 100644 --- a/.github/workflows/pythonbuild.yml +++ b/.github/workflows/pythonbuild.yml @@ -275,6 +275,7 @@ jobs: file: Dockerfile.dev build-args: | PYTHON_VERSION=${{ matrix.python-version }} + PSEUDO_VERSION=1.999.0dev0 push: true tags: localhost:30000/flytekit:dev cache-from: type=gha diff --git a/Dockerfile.dev b/Dockerfile.dev index 59b4e595f2..406740de27 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -32,13 +32,16 @@ RUN apt-get update && apt-get install build-essential vim libmagic1 git -y \ COPY . /flytekit -RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FLYTEKIT=$PSEUDO_VERSION uv pip install --system --no-cache-dir -U \ - "git+https://github.com/flyteorg/flyte.git@master#subdirectory=flyteidl" \ - -e /flytekit \ - -e /flytekit/plugins/flytekit-k8s-pod \ - -e /flytekit/plugins/flytekit-deck-standard \ - -e /flytekit/plugins/flytekit-flyteinteractive \ - scikit-learn \ +# Use a future version of SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FLYTEIDL such that uv resolution works. +RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FLYTEKIT=$PSEUDO_VERSION \ + SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FLYTEIDL=3.0.0dev0 \ + uv pip install --system --no-cache-dir -U \ + "git+https://github.com/flyteorg/flyte.git@master#subdirectory=flyteidl" \ + -e /flytekit \ + -e /flytekit/plugins/flytekit-k8s-pod \ + -e /flytekit/plugins/flytekit-deck-standard \ + -e /flytekit/plugins/flytekit-flyteinteractive \ + scikit-learn \ && apt-get clean autoclean \ && apt-get autoremove --yes \ && rm -rf /var/lib/{apt,dpkg,cache,log}/ \ diff --git a/Makefile b/Makefile index 4605e57719..ba574ae586 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,8 @@ setup: install-piptools ## Install requirements # Warning: this will install the requirements in your system python .PHONY: setup-global-uv setup-global-uv: - uv pip install --system -r dev-requirements.in +# Use "dev0" prefix to emulate version for dev environment + SETUPTOOLS_SCM_PRETEND_VERSION="1.999.0dev0" uv pip install --system -r dev-requirements.in .PHONY: fmt fmt: