diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92f8374..6d5251c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - id: details uses: kpfleming/composite-actions/image-details@v2 with: - base_image: python:bookworm-main + base_image: python:v3-bookworm-main - id: preflight uses: kpfleming/composite-actions/ci-preflight@v2 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 681c12b..46a71ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,7 @@ jobs: run: hatch build -t wheel shell: bash - name: install project - run: hatch run ci.py${{ inputs.python }}:pip install dist/*.whl + run: hatch run ci.py${{ inputs.python }}:uv pip install dist/*.whl shell: bash - name: run tests run: hatch run ci.py${{ inputs.python }}:ci diff --git a/pyproject.toml b/pyproject.toml index f871097..ebc06e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,6 +80,10 @@ packages = [ [tool.hatch.envs.default] python = "3.12" +installer = "uv" +python-sources = [ + "external", +] [tool.hatch.envs.lint] dependencies = [ @@ -122,7 +126,6 @@ python = [ "3.10", "3.11", "3.12", - "3.13", ] [tool.hatch.envs.ci.scripts] diff --git a/workflow-support/make_ci_image.sh b/workflow-support/make_ci_image.sh index e80131e..c35f592 100755 --- a/workflow-support/make_ci_image.sh +++ b/workflow-support/make_ci_image.sh @@ -19,11 +19,10 @@ image_name=${1}; shift dist_name=${1}; shift lint_deps=(shellcheck) -proj_deps=(libsqlite3-0) -proj_build_deps=(build-essential libc6-dev pkg-config) +proj_deps=() +proj_build_deps=() hatchenvs=(lint ci) -cimatrix=(3.8 3.9 3.10 3.11 3.12 3.13) c=$(buildah from "${base_image}") @@ -41,27 +40,20 @@ build_cmd apt install --yes --quiet=2 "${lint_deps[@]}" "${proj_deps[@]}" "${pro for env in "${hatchenvs[@]}"; do # this looks weird... but it causes Hatch to create the env, # install all of the project's dependencies and the project, - # then runs pip to uninstall the project, leaving the env + # then runs 'uv pip' to uninstall the project, leaving the env # in place with the dependencies - case "${env}" in - ci*) - for py in "${cimatrix[@]}"; do - build_cmd_with_source hatch env create "${env}.py${py}" - build_cmd_with_source hatch -e "${env}.py${py}" run pip uninstall --yes "${dist_name}" - done - ;; - *) - build_cmd_with_source hatch env create "${env}" - build_cmd_with_source hatch -e "${env}" run pip uninstall --yes "${dist_name}" - ;; - esac + build_cmd_with_source hatch env create "${env}" + build_cmd_with_source hatch -e "${env}" run uv pip uninstall "${dist_name}" done -build_cmd apt remove --yes --purge "${proj_build_deps[@]}" +if [ -n "${proj_build_deps[*]}" ] +then + build_cmd apt remove --yes --purge "${proj_build_deps[@]}" +fi build_cmd apt autoremove --yes --purge build_cmd apt clean autoclean build_cmd sh -c "rm -rf /var/lib/apt/lists/*" -build_cmd rm -rf /root/.cache +build_cmd uv cache clean if buildah images --quiet "${image_name}"; then buildah rmi "${image_name}" diff --git a/workflow-support/versions.json b/workflow-support/versions.json index 53437db..2dc44cb 100644 --- a/workflow-support/versions.json +++ b/workflow-support/versions.json @@ -1 +1 @@ -versions={"python": ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]} +versions={"python": ["3.8", "3.9", "3.10", "3.11", "3.12"]}