From ba2f1c375d48a5118d08733912205717bceb4766 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Thu, 21 Jul 2022 17:22:31 +0100 Subject: [PATCH 1/4] Experiment with installing SWIG from PyPI --- .github/workflows/bleeding-edge.yml | 5 +---- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bleeding-edge.yml b/.github/workflows/bleeding-edge.yml index f79720fbf..17527a1eb 100644 --- a/.github/workflows/bleeding-edge.yml +++ b/.github/workflows/bleeding-edge.yml @@ -46,10 +46,7 @@ jobs: run: sudo apt-get install libglu1-mesa-dev - name: Install build dependencies run: | - sudo apt-get install swig - python -m pip install -U pip setuptools wheel - python -m pip install numpy - python -m pip install Cython + python -m pip install -U pip wheel - name: Install prebuilt wxPython run: python -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython if: matrix.toolkit == 'wx' diff --git a/pyproject.toml b/pyproject.toml index 42eecc8f0..6db4ded50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["cython", "oldest-supported-numpy", "setuptools", "wheel"] +requires = ["cython", "oldest-supported-numpy", "setuptools", "swig<4", "wheel"] build-backend = "setuptools.build_meta" From 8ee1ab2a9034034f9f5b0d41cd2430381c570c59 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Thu, 21 Jul 2022 17:42:30 +0100 Subject: [PATCH 2/4] Update the EDM-based workflow --- ci/edmtool.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ci/edmtool.py b/ci/edmtool.py index 8f75f84f2..d437481f3 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -94,7 +94,6 @@ "apptools", "celiagg", "coverage", - "Cython", "fonttools", "kiwisolver", "numpy", @@ -104,15 +103,14 @@ "pyparsing", "pypdf2", "reportlab", - "swig", "traits", "traitsui", + "wheel", }, '3.8': { "apptools", "celiagg", "coverage", - "Cython", "fonttools", "kiwisolver", "numpy", @@ -120,9 +118,9 @@ "pyface", "pygments", "pyparsing", - "swig", "traits", "traitsui", + "wheel", } } From 10e28abb50e0924241110d11e6403970d1ba75af Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Fri, 22 Jul 2022 09:45:38 +0100 Subject: [PATCH 3/4] Remove restriction on SWIG version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6db4ded50..54d49e451 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["cython", "oldest-supported-numpy", "setuptools", "swig<4", "wheel"] +requires = ["cython", "oldest-supported-numpy", "setuptools", "swig", "wheel"] build-backend = "setuptools.build_meta" From 5bb1d3357c5bfdb38d8abbb3e893bba3fc62d95a Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Fri, 22 Jul 2022 09:52:58 +0100 Subject: [PATCH 4/4] Add Cython back as a development dependency; remove verify_swig_install --- ci/edmtool.py | 2 ++ setup.py | 13 ------------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/ci/edmtool.py b/ci/edmtool.py index d437481f3..2aa921e9c 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -94,6 +94,7 @@ "apptools", "celiagg", "coverage", + "Cython", "fonttools", "kiwisolver", "numpy", @@ -111,6 +112,7 @@ "apptools", "celiagg", "coverage", + "Cython", "fonttools", "kiwisolver", "numpy", diff --git a/setup.py b/setup.py index 6499ad036..98cb9cd33 100644 --- a/setup.py +++ b/setup.py @@ -428,21 +428,8 @@ def macos_extensions(): ] -def verify_swig_install(): - """ Verify that SWIG is installed. - """ - msg = ("SWIG is a required build dependency of Enable. Please install " - "SWIG (see http://www.swig.org/).") - try: - subprocess.run(["swig", "-version"], check=True) - except (FileNotFoundError, subprocess.CalledProcessError): - raise Exception(msg) - - if __name__ == "__main__": - verify_swig_install() - # Write version modules as needed enable_version_path = os.path.join('enable', '_version.py') write_version_py(filename=enable_version_path)