From 1ef303b50414e675c7130af1455040a11be19722 Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sun, 4 Feb 2024 20:10:29 -0500 Subject: [PATCH] fix: add import for setuptools in newer versions of python --- .github/workflows/python-package.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f9cee48..1c432e4 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.10', '3.11', '3.12',] + python-version: ['3.10', '3.11', '3.12'] WITH_PANDAS: [false, true] steps: @@ -27,8 +27,13 @@ jobs: - name: Install dependencies env: WITH_PANDAS: ${{ matrix.WITH_PANDAS }} + # Install setuptools for the newer versions + # https://docs.python.org/3/whatsnew/3.12.html run: | python -m pip install --upgrade pip + if [ "$(python --version | cut -d ' ' -f 2 | cut -d '.' -f 1,2)" = "3.12" ]; then + pip install setuptools + fi python setup.py develop python -m pip install flake8 pytest-cov coverage vcrpy black tools/install_pandas.sh