From 6280c8be6eb3ec0fb5ce2f2491b00acc546f95ac Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 11:08:26 -0700 Subject: [PATCH 01/16] check python version --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0663d839b3..149288f576 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,6 +163,43 @@ jobs: jupyter notebook --version jupyter notebook --help + install-brew: + needs: [build] + runs-on: macos-latest + timeout-minutes: 15 + steps: + - name: Install Python + run: | + brew install python + sudo ln -s /opt/homebrew/bin/python3 /usr/local/bin/python + python --version + which python + python3 --version + which python3 + - uses: actions/download-artifact@v3 + with: + name: notebook-dist-${{ github.run_number }} + path: ./dist + - name: Install the prerequisites + run: | + python3 -m pip install -U pip wheel + - name: Install the package + run: | + cd dist + python3 -m pip install -vv notebook*.whl + - name: Validate environment + run: | + python3 -m pip freeze + python3 -m pip check + - name: Validate the install + run: | + jupyter labextension list + jupyter labextension list 2>&1 | grep -ie "@jupyter-notebook/lab-extension.*enabled.*ok" - + jupyter server extension list + jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" - + jupyter notebook --version + jupyter notebook --help + check_links: runs-on: ubuntu-latest timeout-minutes: 10 From 7df1cec1d1ba58a3b5497f4cf38bd58c9040289d Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 11:43:57 -0700 Subject: [PATCH 02/16] remove symbolic link use homebrew python --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 149288f576..d8ce33123e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -171,26 +171,26 @@ jobs: - name: Install Python run: | brew install python - sudo ln -s /opt/homebrew/bin/python3 /usr/local/bin/python python --version which python python3 --version which python3 + /opt/homebrew/bin/python3 --version - uses: actions/download-artifact@v3 with: name: notebook-dist-${{ github.run_number }} path: ./dist - name: Install the prerequisites run: | - python3 -m pip install -U pip wheel + /opt/homebrew/bin/python3 -m pip install -U pip wheel - name: Install the package run: | cd dist - python3 -m pip install -vv notebook*.whl + /opt/homebrew/bin/python3 -m pip install -vv notebook*.whl - name: Validate environment run: | - python3 -m pip freeze - python3 -m pip check + /opt/homebrew/bin/python3 -m pip freeze + /opt/homebrew/bin/python3 -m pip check - name: Validate the install run: | jupyter labextension list From f95d5090f2a6d8d8c60c7d72dbe8d7be511e1efb Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 12:12:35 -0700 Subject: [PATCH 03/16] correct python executable name --- .github/workflows/build.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8ce33123e..e7ae7c5865 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -170,27 +170,26 @@ jobs: steps: - name: Install Python run: | - brew install python - python --version - which python + brew install python@3.11 + brew link python@3.11 python3 --version which python3 - /opt/homebrew/bin/python3 --version + /opt/homebrew/bin/python3.11 --version - uses: actions/download-artifact@v3 with: name: notebook-dist-${{ github.run_number }} path: ./dist - name: Install the prerequisites run: | - /opt/homebrew/bin/python3 -m pip install -U pip wheel + /opt/homebrew/bin/python3.11 -m pip install -U pip wheel - name: Install the package run: | cd dist - /opt/homebrew/bin/python3 -m pip install -vv notebook*.whl + /opt/homebrew/bin/python3.11 -m pip install -vv notebook*.whl - name: Validate environment run: | - /opt/homebrew/bin/python3 -m pip freeze - /opt/homebrew/bin/python3 -m pip check + /opt/homebrew/bin/python3.11 -m pip freeze + /opt/homebrew/bin/python3.11 -m pip check - name: Validate the install run: | jupyter labextension list From 27e6dc5740a829bf72e4778d1e6aee976fe79547 Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 12:59:28 -0700 Subject: [PATCH 04/16] update path and check python executable location --- .github/workflows/build.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7ae7c5865..45b893012d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -171,25 +171,37 @@ jobs: - name: Install Python run: | brew install python@3.11 - brew link python@3.11 + brew reinstall python@3.11 + brew unlink python@3.11 && brew link python@3.11 python3 --version which python3 - /opt/homebrew/bin/python3.11 --version + echo 'export PATH="/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV + source $GITHUB_ENV + which python3 - uses: actions/download-artifact@v3 with: name: notebook-dist-${{ github.run_number }} path: ./dist - name: Install the prerequisites run: | - /opt/homebrew/bin/python3.11 -m pip install -U pip wheel + echo 'export PATH="/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV + source $GITHUB_ENV + which python3 + python3 -m pip install -U pip wheel - name: Install the package run: | cd dist - /opt/homebrew/bin/python3.11 -m pip install -vv notebook*.whl + echo 'export PATH="/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV + source $GITHUB_ENV + which python3 + python3 -m pip install -vv notebook*.whl - name: Validate environment run: | - /opt/homebrew/bin/python3.11 -m pip freeze - /opt/homebrew/bin/python3.11 -m pip check + echo 'export PATH="/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV + source $GITHUB_ENV + which python3 + python3 -m pip freeze + python3 -m pip check - name: Validate the install run: | jupyter labextension list From de8d2a8184f5a4e5271166a132ecfa4f5acc17b3 Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 14:40:13 -0700 Subject: [PATCH 05/16] set homebrew first in path --- .github/workflows/build.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45b893012d..3e872daf3b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -170,34 +170,32 @@ jobs: steps: - name: Install Python run: | - brew install python@3.11 + echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $GITHUB_ENV + source $GITHUB_ENV brew reinstall python@3.11 - brew unlink python@3.11 && brew link python@3.11 + brew link --overwrite python@3.11 python3 --version which python3 - echo 'export PATH="/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV - source $GITHUB_ENV - which python3 - uses: actions/download-artifact@v3 with: name: notebook-dist-${{ github.run_number }} path: ./dist - name: Install the prerequisites run: | - echo 'export PATH="/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV + echo 'export PATH="/opt/homebrew/bin:/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV source $GITHUB_ENV which python3 python3 -m pip install -U pip wheel - name: Install the package run: | cd dist - echo 'export PATH="/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV + echo 'export PATH="/opt/homebrew/bin:/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV source $GITHUB_ENV which python3 python3 -m pip install -vv notebook*.whl - name: Validate environment run: | - echo 'export PATH="/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV + echo 'export PATH="/opt/homebrew/bin:/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV source $GITHUB_ENV which python3 python3 -m pip freeze From ebaccbc972914286414a5b5d867af04197b20841 Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 20:12:19 -0700 Subject: [PATCH 06/16] remove brew link --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e872daf3b..c4e2dff998 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -173,7 +173,6 @@ jobs: echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $GITHUB_ENV source $GITHUB_ENV brew reinstall python@3.11 - brew link --overwrite python@3.11 python3 --version which python3 - uses: actions/download-artifact@v3 From 6518806097ef3657cc054ceabde550a38d7e325e Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 20:23:41 -0700 Subject: [PATCH 07/16] change reinstall to install --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4e2dff998..9ee01ec297 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -172,7 +172,7 @@ jobs: run: | echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $GITHUB_ENV source $GITHUB_ENV - brew reinstall python@3.11 + brew install python@3.11 python3 --version which python3 - uses: actions/download-artifact@v3 From 900efedc99841b3c4eb82ba514c19191e8decd96 Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 20:52:33 -0700 Subject: [PATCH 08/16] change homebrew install directory copying the files --- .github/workflows/build.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ee01ec297..8bd7e191f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -170,32 +170,29 @@ jobs: steps: - name: Install Python run: | - echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $GITHUB_ENV - source $GITHUB_ENV + sudo mkdir -p /opt/homebrew + sudo chown -R $(whoami) /opt/homebrew + sudo chown -R $(whoami) /opt + sudo chown -R $(who) + echo 'export HOMEBREW_PREFIX=/opt/homebrew' + sudo mv /usr/local/* /opt/homebrew/ + brew update brew install python@3.11 - python3 --version - which python3 - uses: actions/download-artifact@v3 with: name: notebook-dist-${{ github.run_number }} path: ./dist - name: Install the prerequisites run: | - echo 'export PATH="/opt/homebrew/bin:/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV - source $GITHUB_ENV which python3 python3 -m pip install -U pip wheel - name: Install the package run: | cd dist - echo 'export PATH="/opt/homebrew/bin:/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV - source $GITHUB_ENV which python3 python3 -m pip install -vv notebook*.whl - name: Validate environment run: | - echo 'export PATH="/opt/homebrew/bin:/opt/homebrew/opt/python@3.11/bin:$PATH"' >> $GITHUB_ENV - source $GITHUB_ENV which python3 python3 -m pip freeze python3 -m pip check From 82a5afa525d8ef8b569467553115827a076bb06f Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 21:16:54 -0700 Subject: [PATCH 09/16] remove sudo chown on who --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8bd7e191f2..20e02737c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -173,7 +173,6 @@ jobs: sudo mkdir -p /opt/homebrew sudo chown -R $(whoami) /opt/homebrew sudo chown -R $(whoami) /opt - sudo chown -R $(who) echo 'export HOMEBREW_PREFIX=/opt/homebrew' sudo mv /usr/local/* /opt/homebrew/ brew update From 9c2c2b96b80b31535462d495324f8c16cd8a4226 Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 21:51:43 -0700 Subject: [PATCH 10/16] install homebrew into /opt/homebrew directory --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20e02737c1..b07d92b1ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -175,6 +175,7 @@ jobs: sudo chown -R $(whoami) /opt echo 'export HOMEBREW_PREFIX=/opt/homebrew' sudo mv /usr/local/* /opt/homebrew/ + curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew brew update brew install python@3.11 - uses: actions/download-artifact@v3 From 5333f1834d59dac9c5b0c722e272fab96c88eeac Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 22:00:47 -0700 Subject: [PATCH 11/16] update install path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b07d92b1ef..d47afe2d4d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -175,7 +175,7 @@ jobs: sudo chown -R $(whoami) /opt echo 'export HOMEBREW_PREFIX=/opt/homebrew' sudo mv /usr/local/* /opt/homebrew/ - curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew + curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /opt/homebrew brew update brew install python@3.11 - uses: actions/download-artifact@v3 From 60cf707bdd4f48e5a236faebbb6fe4111bedf8fb Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 22:17:57 -0700 Subject: [PATCH 12/16] update the path --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d47afe2d4d..60ac924a4c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -174,6 +174,7 @@ jobs: sudo chown -R $(whoami) /opt/homebrew sudo chown -R $(whoami) /opt echo 'export HOMEBREW_PREFIX=/opt/homebrew' + echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $GITHUB_ENV sudo mv /usr/local/* /opt/homebrew/ curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /opt/homebrew brew update From 69c5f63815db89eed2172e448975edc2e93cb0f4 Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 22:31:35 -0700 Subject: [PATCH 13/16] try installing brew with bash curl command --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60ac924a4c..d8ed40e760 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,7 +176,9 @@ jobs: echo 'export HOMEBREW_PREFIX=/opt/homebrew' echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $GITHUB_ENV sudo mv /usr/local/* /opt/homebrew/ - curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /opt/homebrew + ls -a /opt/homebrew + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" --prefix=/opt/homebrew + ls -a /opt/homebrew brew update brew install python@3.11 - uses: actions/download-artifact@v3 From dd5128a8b0579613a2ebac0cdd46da2c37a23e0e Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 23:06:41 -0700 Subject: [PATCH 14/16] check if directory exists --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8ed40e760..d3010f4590 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,9 +176,9 @@ jobs: echo 'export HOMEBREW_PREFIX=/opt/homebrew' echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $GITHUB_ENV sudo mv /usr/local/* /opt/homebrew/ - ls -a /opt/homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" --prefix=/opt/homebrew ls -a /opt/homebrew + $DIR=/opt/homebrew/bin/python3.11; [ -d "$DIR" ] && echo "$DIR directory exists." brew update brew install python@3.11 - uses: actions/download-artifact@v3 From 1e19ec9099ad8595dbb9b8985b6253a4f84914aa Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 23:30:05 -0700 Subject: [PATCH 15/16] update syntax --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3010f4590..7a263b6867 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -178,7 +178,7 @@ jobs: sudo mv /usr/local/* /opt/homebrew/ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" --prefix=/opt/homebrew ls -a /opt/homebrew - $DIR=/opt/homebrew/bin/python3.11; [ -d "$DIR" ] && echo "$DIR directory exists." + DIR="/opt/homebrew/bin/python3.11"; [ -d "$DIR" ] && echo '$DIR directory exists.'' brew update brew install python@3.11 - uses: actions/download-artifact@v3 From f2b09fc4f6cdaeea64e5ddbf69fbda70cefab625 Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 9 Aug 2023 23:35:48 -0700 Subject: [PATCH 16/16] fix syntax --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a263b6867..37dd604cdc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -178,9 +178,9 @@ jobs: sudo mv /usr/local/* /opt/homebrew/ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" --prefix=/opt/homebrew ls -a /opt/homebrew - DIR="/opt/homebrew/bin/python3.11"; [ -d "$DIR" ] && echo '$DIR directory exists.'' brew update brew install python@3.11 + DIR="/opt/homebrew/bin/python3.11"; [ -d "$DIR" ] && echo '$DIR directory exists.' - uses: actions/download-artifact@v3 with: name: notebook-dist-${{ github.run_number }}