From 1e78bb1581227df101721b9346c01b95b7fc45d2 Mon Sep 17 00:00:00 2001 From: John Sirois Date: Tue, 24 Jan 2023 14:40:59 -0800 Subject: [PATCH 1/2] Remove the Pants Python interpreter from PATH. Since this interpreter is hobbled - it cannot build C extensions - it is dangerous to have it discoverable on the PATH. Anyone needing to build C extensions needs to supply their own local Python interpreter. Fixes #69 --- package/scie-pants.lift.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/package/scie-pants.lift.json b/package/scie-pants.lift.json index e218731..c90453b 100644 --- a/package/scie-pants.lift.json +++ b/package/scie-pants.lift.json @@ -91,7 +91,6 @@ "pants": { "description": "Runs a hermetic Pants installation.", "env": { - "=PATH": "{scie.env.PATH}:{scie.bindings.install:VIRTUAL_ENV}/bin", "=PANTS_VERSION": "{scie.bindings.configure:PANTS_VERSION}", "PANTS_BUILDROOT_OVERRIDE": "{scie.bindings.configure:PANTS_BUILDROOT_OVERRIDE}" }, @@ -104,7 +103,6 @@ "pants-debug": { "description": "Runs a hermetic Pants installation with a debug server for debugging Pants code.", "env": { - "=PATH": "{scie.env.PATH}:{scie.bindings.install:VIRTUAL_ENV}/bin", "=PANTS_VERSION": "{scie.bindings.configure:PANTS_VERSION}", "PANTS_BUILDROOT_OVERRIDE": "{scie.bindings.configure:PANTS_BUILDROOT_OVERRIDE}" }, From 6b2fdf9ac169bff9d9a70d69837046e3e80530e4 Mon Sep 17 00:00:00 2001 From: John Sirois Date: Tue, 24 Jan 2023 15:04:13 -0800 Subject: [PATCH 2/2] Setup Python for tools.pex lints and tests. --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf5ade1..aa666d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,13 @@ jobs: run: | PANTS_BOOTSTRAP_GITHUB_API_BEARER_TOKEN=${{ secrets.GITHUB_TOKEN }} \ cargo run -p package -- test + - name: Setup Python 3.9 + if: ${{ matrix.os == 'ubuntu-22.04' }} + uses: actions/setup-python@v4 + with: + # N.B.: We need Python 3.9 for running Pants goals against our tools.pex Python tools + # codebase. + python-version: "3.9" - name: Build, Package & Integration Tests if: ${{ matrix.os == 'ubuntu-22.04' }} run: |