From 648b0c7cfe6d5c22bce8fea6ec556a766020b9f5 Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Thu, 31 Oct 2024 11:13:01 -0400 Subject: [PATCH 1/6] fix(ci): do not use matrix variables for OS-specific commands The use of `matrix.NIGHTLY`, `matrix.EXTRACT`, etc. makes CI matrix configuration difficult. Instead, let the shell script for the neovim installation step take care of OS specializations. --- .github/workflows/test.yml | 51 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b747297c..c71a965d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,21 +35,6 @@ jobs: include: - os: 'ubuntu-20.04' python-version: '3.7' - NIGHTLY: nvim-linux64.tar.gz - NVIM_BIN_PATH: nvim-linux64/bin - EXTRACT: tar xzf - - os: 'ubuntu-latest' - NIGHTLY: nvim-linux64.tar.gz - NVIM_BIN_PATH: nvim-linux64/bin - EXTRACT: tar xzf - - os: 'macos-latest' - NIGHTLY: nvim-macos-x86_64.tar.gz - NVIM_BIN_PATH: nvim-macos-x86_64/bin - EXTRACT: tar xzf - - os: 'windows-latest' - NIGHTLY: nvim-win64.zip - NVIM_BIN_PATH: nvim-win64/bin - EXTRACT: unzip name: "test (python ${{ matrix.python-version }}, ${{ matrix.os }})" runs-on: ${{ matrix.os }} @@ -60,20 +45,36 @@ jobs: cache: 'pip' python-version: ${{ matrix.python-version }} - - name: update path (bash) + - name: install neovim (Linux/macOS) if: runner.os != 'Windows' - run: echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" >> $GITHUB_PATH + run: | + set -eu -o pipefail - - name: update path (windows) - if: runner.os == 'Windows' - run: echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + if [[ "$RUNNER_OS" == "Linux" ]]; then + BASE="nvim-linux64" + elif [[ "$RUNNER_OS" == "macOS" ]]; then + BASE="nvim-macos-x86_64" + else + echo "$RUNNER_OS not supported"; exit 1; + fi + + curl -LO "https://github.com/neovim/neovim/releases/download/nightly/${BASE}.tar.gz" + tar xzf "${BASE}.tar.gz" + echo "RUNNER_OS = $RUNNER_OS" + $BASE/bin/nvim --version - - name: install neovim + # update $PATH for later steps + echo "$(pwd)/$BASE/bin" >> $GITHUB_PATH + + - name: install neovim (Windows) + if: runner.os == 'Windows' run: | - curl -LO 'https://github.com/neovim/neovim/releases/download/nightly/${{ matrix.NIGHTLY }}' - ${{ matrix.EXTRACT }} ${{ matrix.NIGHTLY }} - echo '${{ runner.os }}' - nvim --version + curl -LO "https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip" + unzip nvim-win64.zip + nvim-win64/bin/nvim --version + + # update $PATH for later steps + echo "$(pwd)/nvim-win64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: install dependencies run: | From a6175a483ec867bbe38561ddd1f9a421198c376d Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Thu, 31 Oct 2024 10:46:27 -0400 Subject: [PATCH 2/6] fix(ci): macOS CI failing with python{3.7, 3.8, 3.9} Problem: macos-latest now points to M1 runners (macos-14-arm64) which do not support python 3.7 - 3.9. Solution: For these python versions, use the macos-12 (x86_64) runner. --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c71a965d..4241e6b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,9 +32,21 @@ jobs: exclude: - os: 'ubuntu-latest' python-version: '3.7' + - os: 'macos-latest' + python-version: '3.7' + - os: 'macos-latest' + python-version: '3.8' + - os: 'macos-latest' + python-version: '3.9' include: - os: 'ubuntu-20.04' python-version: '3.7' + - os: 'macos-12' + python-version: '3.7' + - os: 'macos-12' + python-version: '3.8' + - os: 'macos-12' + python-version: '3.9' name: "test (python ${{ matrix.python-version }}, ${{ matrix.os }})" runs-on: ${{ matrix.os }} From 2b5a3275e68f2c5387fb83cc45ff09f58948e180 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 2 Nov 2024 22:54:18 -0400 Subject: [PATCH 3/6] chore: Bump version --- pynvim/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynvim/_version.py b/pynvim/_version.py index 5d3c4712..8223d4bd 100644 --- a/pynvim/_version.py +++ b/pynvim/_version.py @@ -4,7 +4,7 @@ from types import SimpleNamespace # see also setup.py -VERSION = SimpleNamespace(major=0, minor=5, patch=1, prerelease="") +VERSION = SimpleNamespace(major=0, minor=5, patch=2, prerelease="dev0") # e.g. "0.5.0", "0.5.0.dev0" (PEP-440) __version__ = '{major}.{minor}.{patch}'.format(**vars(VERSION)) From 31550a7c6f1f6464703bffa8d3de284b0b0ebf85 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 2 Nov 2024 23:12:18 -0400 Subject: [PATCH 4/6] fix: remove deprecated universal wheels setting running bdist_wheel /usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:111: SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated !! ******************************************************************************** With Python 2.7 end-of-life, support for building universal wheels (i.e., wheels that support both Python 2 and Python 3) is being obviated. Please discontinue using this option, or if you still need it, file an issue with pypa/setuptools describing your use case. By 2025-Aug-30, you need to update your project and remove deprecated calls or your builds will no longer be supported. ******************************************************************************** !! --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index ea12903c..b41f1c52 100644 --- a/setup.py +++ b/setup.py @@ -63,5 +63,4 @@ setup_requires=setup_requires, tests_require=tests_require, extras_require=extras_require, - options={"bdist_wheel": {"universal": True}}, ) From a2adeecbb753b2998b24f9ec7ea2b927f6332042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 4 Nov 2024 13:55:48 +0100 Subject: [PATCH 5/6] build: fix conditional install_requires #581 Fix conditional `install_requires` in `setup.py` to use environment markers instead of inline conditions. The latter do not work correctly with universal wheels -- e.g. a wheel made on Python 3.12 would not have a dependency on `typing-extensions` at all, even if it were installed on Python 3.11 or older, and the other way around. --- setup.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index b41f1c52..e3739f5c 100644 --- a/setup.py +++ b/setup.py @@ -10,6 +10,8 @@ install_requires = [ 'msgpack>=0.5.0', + 'greenlet>=3.0; python_implementation != "PyPy"', + 'typing-extensions>=4.5; python_version < "3.12"', ] needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv) @@ -32,13 +34,6 @@ 'docs': docs_require, } -if platform.python_implementation() != 'PyPy': - # pypy already includes an implementation of the greenlet module - install_requires.append('greenlet>=3.0') - -if sys.version_info < (3, 12): - install_requires.append('typing-extensions>=4.5') - # __version__: see pynvim/_version.py with open(os.path.join(__PATH__, "pynvim/_version.py"), From 5b0c32e98ef9093927ec85788e159f9e5cdfed03 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 12 Nov 2024 22:00:16 -0500 Subject: [PATCH 6/6] Pynvim 0.5.2 - a2adeec build: fix conditional install_requires #581 - 31550a7 fix: remove deprecated universal wheels setting - a6175a4 fix(ci): macOS CI failing with python{3.7, 3.8, 3.9} - 648b0c7 fix(ci): do not use matrix variables for OS-specific commands --- pynvim/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynvim/_version.py b/pynvim/_version.py index 8223d4bd..89b7fd96 100644 --- a/pynvim/_version.py +++ b/pynvim/_version.py @@ -4,7 +4,7 @@ from types import SimpleNamespace # see also setup.py -VERSION = SimpleNamespace(major=0, minor=5, patch=2, prerelease="dev0") +VERSION = SimpleNamespace(major=0, minor=5, patch=2, prerelease="") # e.g. "0.5.0", "0.5.0.dev0" (PEP-440) __version__ = '{major}.{minor}.{patch}'.format(**vars(VERSION))