From e7d91778eca17d8d8b088cc37e3de124ec0b3de7 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 5 Jun 2023 08:51:34 -0700 Subject: [PATCH 01/21] Add --quiet option --- build.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index 9df36f4e7..f9a0dfa56 100755 --- a/build.py +++ b/build.py @@ -162,6 +162,8 @@ def usage(): def main(args): + options, commands = parseArgs(args) + setPythonVersion(args) setDevModeOptions(args) @@ -183,8 +185,6 @@ def main(args): usage() sys.exit(1) - options, commands = parseArgs(args) - cfg = Config(noWxConfig=True) msg('cfg.VERSION: %s' % cfg.VERSION) msg('') @@ -453,6 +453,7 @@ def makeOptionParser(): ("regenerate_sysconfig", (False, "Waf uses Python's sysconfig and related tools to configure the build. In some cases that info can be incorrect, so this option regenerates it. Must have write access to Python's lib folder.")), ("no_allmo", (False, "Skip regenerating the wxWidgets message catalogs")), ("no_msedge", (False, "Do not include the MS Edge backend for wx.html2.WebView. (Windows only)")), + ("quiet", (False, "Silence some of the messages from build.py")) ] parser = optparse.OptionParser("build options:") @@ -499,6 +500,10 @@ def parseArgs(args): if options.gtk2: options.gtk3 = False + if options.quiet: + import buildtools.config + buildtools.config.runSilently = True + return options, args @@ -1081,6 +1086,10 @@ def cmd_docset(options, args): cmd_docset_py(options, args) +def cmd_version(options, args): + cfg = Config() + print(cfg.VERSION) + def cmd_etg(options, args): cmdTimer = CommandTimer('etg') From 729a65ca5b2c62653ee3f9ff3aec112c48cb536f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 5 Jun 2023 11:26:58 -0700 Subject: [PATCH 02/21] First pass on github workflow for CI --- .github/workflows/ci-build.yml | 147 +++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 .github/workflows/ci-build.yml diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 000000000..19e2e35ba --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,147 @@ +#--------------------------------------------------------------------------- +# This workflow will build and archive a wxPython source distribution for +# CI. It will start by building a sdist archive first, and then that will be +# used in subsequent jobs on each supported platform and Python version. +#--------------------------------------------------------------------------- + +name: wxPython CI build source + +on: + push: + branches: [ 'master' ] + pull_request: + branches: [ 'master' ] + +permissions: + contents: read + +defaults: + run: + shell: bash + +jobs: + build-source-dist: + runs-on: ubuntu-latest + + outputs: + VERSION: + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: 'pip' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade -r requirements.txt + + - name: Generate code and create sdist + id: generate + run: | + python build.py setrev etg sip --nodoc sdist + VERSION=$(python build.py --quiet version) + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + + - name: Save sdist as workflow artifact + uses: actions/upload-artifact@v3 + with: + name: wxPython-ci-sdist-${{ steps.generate.outputs.VERSION }} + path: dist/wxPython-${{ steps.generate.outputs.VERSION }}.tar.gz + + +#--------------------------------------------------------------------------- + + build-wheels: + name: wheels + needs: build-source-dist + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + architechture: ['x86', 'x64'] + # Exclude x86 configs on non-Windows OSs + exclude: + - os: ubuntu-latest + architecture: x86 + - os: macos-latest + architecture: x86 + + # # Add matrix slots for 32-bit Pythons on Windows + # include: + # - os: 'windows-latest' + # python-version: '3.7' + # architecture: 'x86' + # - os: 'windows-latest' + # python-version: '3.8' + # architecture: 'x86' + # - os: 'windows-latest' + # python-version: '3.9' + # architecture: 'x86' + # - os: 'windows-latest' + # python-version: '3.10' + # architecture: 'x86' + # - os: 'windows-latest' + # python-version: '3.11' + # architecture: 'x86' + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: download CI sdist archive + uses: actions/download-artifact@v3 + with: + name: wxPython-ci-sdist-${{ needs.build-source-dist.VERSION }} + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: '${{ matrix.python-version }}' + architecture: '${{ matrix.architecture }}' + cache: 'pip' + + - name: Install dependencies + shell: bash + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade -r requirements.txt + + # TODO: Install needed apt packages if we're on Linux + if [ ${{ matrix.os }} == ubuntu-latest ]; then + apt-get install -y \ + freeglut3 \ + freeglut3-dev \ + libgl1-mesa-dev \ + libglu1-mesa-dev \ + libgstreamer-plugins-base1.0-dev \ + libgtk-3-dev \ + libjpeg-dev \ + libnotify-dev \ + libsdl2-dev \ + libsm-dev \ + libtiff-dev \ + libwebkit2gtk-4.0-dev \ + libxtst-dev; + fi + + - name: Build wheel + shell: bash + run: | + mkdir dist + mv wxPython-*.tar.gz dist + cd dist + pip wheel -v wxPython-*.tar.gz + + # Archive wheel file From 6c4fcb167ab4815e23e59cd10efa5e45d674198a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 5 Jun 2023 11:28:20 -0700 Subject: [PATCH 03/21] Comment out the 2nd job for now --- .github/workflows/ci-build.yml | 172 ++++++++++++++++----------------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 19e2e35ba..5e002764c 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -59,89 +59,89 @@ jobs: #--------------------------------------------------------------------------- - build-wheels: - name: wheels - needs: build-source-dist - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] - architechture: ['x86', 'x64'] - # Exclude x86 configs on non-Windows OSs - exclude: - - os: ubuntu-latest - architecture: x86 - - os: macos-latest - architecture: x86 - - # # Add matrix slots for 32-bit Pythons on Windows - # include: - # - os: 'windows-latest' - # python-version: '3.7' - # architecture: 'x86' - # - os: 'windows-latest' - # python-version: '3.8' - # architecture: 'x86' - # - os: 'windows-latest' - # python-version: '3.9' - # architecture: 'x86' - # - os: 'windows-latest' - # python-version: '3.10' - # architecture: 'x86' - # - os: 'windows-latest' - # python-version: '3.11' - # architecture: 'x86' - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - - name: download CI sdist archive - uses: actions/download-artifact@v3 - with: - name: wxPython-ci-sdist-${{ needs.build-source-dist.VERSION }} - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: '${{ matrix.python-version }}' - architecture: '${{ matrix.architecture }}' - cache: 'pip' - - - name: Install dependencies - shell: bash - run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade -r requirements.txt - - # TODO: Install needed apt packages if we're on Linux - if [ ${{ matrix.os }} == ubuntu-latest ]; then - apt-get install -y \ - freeglut3 \ - freeglut3-dev \ - libgl1-mesa-dev \ - libglu1-mesa-dev \ - libgstreamer-plugins-base1.0-dev \ - libgtk-3-dev \ - libjpeg-dev \ - libnotify-dev \ - libsdl2-dev \ - libsm-dev \ - libtiff-dev \ - libwebkit2gtk-4.0-dev \ - libxtst-dev; - fi - - - name: Build wheel - shell: bash - run: | - mkdir dist - mv wxPython-*.tar.gz dist - cd dist - pip wheel -v wxPython-*.tar.gz - - # Archive wheel file + # build-wheels: + # name: wheels + # needs: build-source-dist + # strategy: + # matrix: + # os: [ubuntu-latest, windows-latest, macos-latest] + # python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + # architechture: ['x86', 'x64'] + # # Exclude x86 configs on non-Windows OSs + # exclude: + # - os: ubuntu-latest + # architecture: x86 + # - os: macos-latest + # architecture: x86 + + # # # Add matrix slots for 32-bit Pythons on Windows + # # include: + # # - os: 'windows-latest' + # # python-version: '3.7' + # # architecture: 'x86' + # # - os: 'windows-latest' + # # python-version: '3.8' + # # architecture: 'x86' + # # - os: 'windows-latest' + # # python-version: '3.9' + # # architecture: 'x86' + # # - os: 'windows-latest' + # # python-version: '3.10' + # # architecture: 'x86' + # # - os: 'windows-latest' + # # python-version: '3.11' + # # architecture: 'x86' + + # runs-on: ${{ matrix.os }} + + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + # with: + # submodules: 'recursive' + + # - name: download CI sdist archive + # uses: actions/download-artifact@v3 + # with: + # name: wxPython-ci-sdist-${{ needs.build-source-dist.generate.VERSION }} + + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v4 + # with: + # python-version: '${{ matrix.python-version }}' + # architecture: '${{ matrix.architecture }}' + # cache: 'pip' + + # - name: Install dependencies + # shell: bash + # run: | + # python -m pip install --upgrade pip setuptools wheel + # python -m pip install --upgrade -r requirements.txt + + # # TODO: Install needed apt packages if we're on Linux + # if [ ${{ matrix.os }} == ubuntu-latest ]; then + # apt-get install -y \ + # freeglut3 \ + # freeglut3-dev \ + # libgl1-mesa-dev \ + # libglu1-mesa-dev \ + # libgstreamer-plugins-base1.0-dev \ + # libgtk-3-dev \ + # libjpeg-dev \ + # libnotify-dev \ + # libsdl2-dev \ + # libsm-dev \ + # libtiff-dev \ + # libwebkit2gtk-4.0-dev \ + # libxtst-dev; + # fi + + # - name: Build wheel + # shell: bash + # run: | + # mkdir -p dist + # mv wxPython-${{ needs.build-source-dist.generate.VERSION }}.tar.gz dist + # cd dist + # pip wheel -v wxPython-${{ needs.build-source-dist.generate.VERSION }}.tar.gz + + # # Archive wheel file From 3b3f86faac43d11afacdac280592247922f98de2 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 8 Jun 2023 19:51:34 -0700 Subject: [PATCH 04/21] Changes and tweaks from what I learned in a test project --- .github/workflows/ci-build.yml | 77 ++++++++++++++++------------------ 1 file changed, 35 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 5e002764c..0a8301a4f 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -4,7 +4,7 @@ # used in subsequent jobs on each supported platform and Python version. #--------------------------------------------------------------------------- -name: wxPython CI build source +name: ci-build on: push: @@ -24,10 +24,10 @@ jobs: runs-on: ubuntu-latest outputs: - VERSION: + VERSION: ${{ steps.generate.outputs.version }} steps: - - name: Checkout + - name: Checkout repo uses: actions/checkout@v3 with: submodules: 'recursive' @@ -48,25 +48,24 @@ jobs: run: | python build.py setrev etg sip --nodoc sdist VERSION=$(python build.py --quiet version) - echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - name: Save sdist as workflow artifact + - name: Save sdist as job artifact uses: actions/upload-artifact@v3 with: - name: wxPython-ci-sdist-${{ steps.generate.outputs.VERSION }} - path: dist/wxPython-${{ steps.generate.outputs.VERSION }}.tar.gz + name: wxPython-source + path: dist/wxPython-${{ steps.generate.outputs.version }}.tar.gz #--------------------------------------------------------------------------- # build-wheels: - # name: wheels # needs: build-source-dist # strategy: # matrix: # os: [ubuntu-latest, windows-latest, macos-latest] # python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] - # architechture: ['x86', 'x64'] + # architecture: ['x86', 'x64'] # # Exclude x86 configs on non-Windows OSs # exclude: # - os: ubuntu-latest @@ -74,36 +73,22 @@ jobs: # - os: macos-latest # architecture: x86 - # # # Add matrix slots for 32-bit Pythons on Windows - # # include: - # # - os: 'windows-latest' - # # python-version: '3.7' - # # architecture: 'x86' - # # - os: 'windows-latest' - # # python-version: '3.8' - # # architecture: 'x86' - # # - os: 'windows-latest' - # # python-version: '3.9' - # # architecture: 'x86' - # # - os: 'windows-latest' - # # python-version: '3.10' - # # architecture: 'x86' - # # - os: 'windows-latest' - # # python-version: '3.11' - # # architecture: 'x86' + # env: + # VERSION: ${{ needs.build-source-dist.outputs.VERSION }} # runs-on: ${{ matrix.os }} # steps: - # - name: Checkout + # - name: Checkout repo # uses: actions/checkout@v3 # with: # submodules: 'recursive' - # - name: download CI sdist archive + # - name: download CI source artifact # uses: actions/download-artifact@v3 # with: - # name: wxPython-ci-sdist-${{ needs.build-source-dist.generate.VERSION }} + # name: wxPython-source + # path: dist # - name: Set up Python ${{ matrix.python-version }} # uses: actions/setup-python@v4 @@ -112,15 +97,15 @@ jobs: # architecture: '${{ matrix.architecture }}' # cache: 'pip' - # - name: Install dependencies - # shell: bash + # - name: Install Python dependencies # run: | # python -m pip install --upgrade pip setuptools wheel # python -m pip install --upgrade -r requirements.txt - # # TODO: Install needed apt packages if we're on Linux - # if [ ${{ matrix.os }} == ubuntu-latest ]; then - # apt-get install -y \ + # - name: Install Ubuntu dependencies + # if: ${{ matrix.os }} == ubuntu-latest + # run: | + # apt-get install -y \ # freeglut3 \ # freeglut3-dev \ # libgl1-mesa-dev \ @@ -134,14 +119,22 @@ jobs: # libtiff-dev \ # libwebkit2gtk-4.0-dev \ # libxtst-dev; - # fi - # - name: Build wheel - # shell: bash + # - name: Build wxPython wheel # run: | - # mkdir -p dist - # mv wxPython-${{ needs.build-source-dist.generate.VERSION }}.tar.gz dist - # cd dist - # pip wheel -v wxPython-${{ needs.build-source-dist.generate.VERSION }}.tar.gz + # cd dist + # pip wheel -v wxPython-${{ env.VERSION }}.tar.gz - # # Archive wheel file + # - name: Simple smoke test + # run: | + # cd dist + # pip install wxPython-*.whl + # python -c "import wx; print(wx); print(wx.version()); print(wx.PlatformInfo)" + + # - name: Save wheel as job artifact + # uses: actions/upload-artifact@v3 + # # Just Windows and Macos + # if: ${{ matrix.os != 'ubuntu-latest' }} + # with: + # name: wxPython-wheel-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.architecture}} + # path: dist/wxPython-*.whl From 4219d4a1c2dea11fb4d9609cb39c81882ca80bdc Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 8 Jun 2023 19:59:46 -0700 Subject: [PATCH 05/21] We also need to run the dox command --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 0a8301a4f..6b4538e8a 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -46,7 +46,7 @@ jobs: - name: Generate code and create sdist id: generate run: | - python build.py setrev etg sip --nodoc sdist + python build.py setrev dox etg sip --nodoc sdist VERSION=$(python build.py --quiet version) echo "version=$VERSION" >> "$GITHUB_OUTPUT" From 72a45cda3f967450bdcc35634c9fe8ef441ab2dc Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 8 Jun 2023 20:13:02 -0700 Subject: [PATCH 06/21] Set PYTHONUNBUFFERED in the workflow --- .github/workflows/ci-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 6b4538e8a..05ea6c8bc 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -11,6 +11,7 @@ on: branches: [ 'master' ] pull_request: branches: [ 'master' ] + workflow_dispatch: permissions: contents: read @@ -19,6 +20,9 @@ defaults: run: shell: bash +env: + PYTHONUNBUFFERED: 1 + jobs: build-source-dist: runs-on: ubuntu-latest From 3d773d45a13fc60d5f6a272d37461a4155ffa451 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 8 Jun 2023 20:28:09 -0700 Subject: [PATCH 07/21] Copy sip.h when the siplib is (re)created, instead of later during the build --- build.py | 3 +++ wscript | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index f9a0dfa56..5b99e9a05 100755 --- a/build.py +++ b/build.py @@ -1415,6 +1415,9 @@ def injectClassInfo(className, srcTxt): tf.extractall(tmpdir) shutil.move(tf_dir, cfg.SIPINC) + # Copy sip's sip.h for distribution with wxPython's header + copyFile('sip/siplib/sip.h', 'wx/include/wxPython', verbose=True) + def cmd_touch(options, args): cmdTimer = CommandTimer('touch') diff --git a/wscript b/wscript index 048a3df6d..89c2899fb 100644 --- a/wscript +++ b/wscript @@ -561,9 +561,6 @@ def build(bld): for name in ['src/__init__.py', 'src/gizmos.py',]: copy_file(name, cfg.PKGDIR, update=1, verbose=1) - # Copy sip's sip.h for distribution with wxPython's header - copy_file('sip/siplib/sip.h', 'wx/include/wxPython', update=1, verbose=1) - # Create the build tasks for each of our extension modules. addRelwithdebugFlags(bld, 'siplib') siplib = bld( From a084279c8406eb0ee3ba100b4354dceaac0ac8ec Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 8 Jun 2023 21:03:52 -0700 Subject: [PATCH 08/21] generate version modules in cmd_sdist too --- build.py | 7 ++++--- buildtools/config.py | 16 ++++++++++++++++ wscript | 19 ++----------------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/build.py b/build.py index 5b99e9a05..bc7f04eaa 100755 --- a/build.py +++ b/build.py @@ -46,7 +46,7 @@ macSetLoaderNames, \ getVcsRev, runcmd, textfile_open, getSipFiles, \ getVisCVersion, getToolsPlatformName, updateLicenseFiles, \ - TemporaryDirectory, getMSVCInfo + TemporaryDirectory, getMSVCInfo, generateVersionFiles import buildtools.version as version @@ -162,10 +162,9 @@ def usage(): def main(args): + setDevModeOptions(args) options, commands = parseArgs(args) - setPythonVersion(args) - setDevModeOptions(args) os.environ['PYTHONPATH'] = os.environ.get('PYTHONPATH', '') + os.pathsep + phoenixDir() os.environ['PYTHONUNBUFFERED'] = 'yes' @@ -2170,6 +2169,8 @@ def _archive_submodules(root, dest): _archive_submodules('.', os.path.abspath(PDEST)) + generateVersionFiles(cfg) + # copy Phoenix's generated code into the archive tree msg('Copying generated files...') os.mkdir(posixjoin(PDEST, 'sip', 'siplib')) diff --git a/buildtools/config.py b/buildtools/config.py index cf9f2ba17..7d1d507fb 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -724,6 +724,22 @@ def getEtgSipCppFiles(etg): def getEtgSipHeaders(etg): return _getSbfValue(etg, 'headers') +def generateVersionFiles(cfg): + # create the package's __version__ module + with open(opj(cfg.PKGDIR, '__version__.py'), 'w') as fid: + fid.write("# This file was generated by wxPython's wscript.\n\n" + "VERSION_STRING = '%(VERSION)s'\n" + "MAJOR_VERSION = %(VER_MAJOR)s\n" + "MINOR_VERSION = %(VER_MINOR)s\n" + "RELEASE_NUMBER = %(VER_RELEASE)s\n" + "BUILD_TYPE = '%(BUILD_TYPE)s'\n\n" + "VERSION = (MAJOR_VERSION, MINOR_VERSION, RELEASE_NUMBER, '%(VER_FLAGS)s')\n" + % cfg.__dict__) + # and one for the demo folder too + with open('demo/version.py', 'w') as fid: + fid.write("# This file was generated by wxPython's wscript.\n\n" + "VERSION_STRING = '%(VERSION)s'\n" + % cfg.__dict__) def findCmd(cmd): """ diff --git a/wscript b/wscript index 89c2899fb..3e7f1c176 100644 --- a/wscript +++ b/wscript @@ -16,7 +16,7 @@ try: except ImportError: from buildtools.backports.textwrap3 import indent -from buildtools.config import Config, runcmd, msg, getMSVCInfo +from buildtools.config import Config, runcmd, msg, getMSVCInfo, generateVersionFiles cfg = Config(True) #----------------------------------------------------------------------------- @@ -537,22 +537,7 @@ def build(bld): # Copy the license files from wxWidgets updateLicenseFiles(cfg) - # create the package's __version__ module - with open(opj(cfg.PKGDIR, '__version__.py'), 'w') as fid: - fid.write("# This file was generated by wxPython's wscript.\n\n" - "VERSION_STRING = '%(VERSION)s'\n" - "MAJOR_VERSION = %(VER_MAJOR)s\n" - "MINOR_VERSION = %(VER_MINOR)s\n" - "RELEASE_NUMBER = %(VER_RELEASE)s\n" - "BUILD_TYPE = '%(BUILD_TYPE)s'\n\n" - "VERSION = (MAJOR_VERSION, MINOR_VERSION, RELEASE_NUMBER, '%(VER_FLAGS)s')\n" - % cfg.__dict__) - # and one for the demo folder too - with open('demo/version.py', 'w') as fid: - fid.write("# This file was generated by wxPython's wscript.\n\n" - "VERSION_STRING = '%(VERSION)s'\n" - % cfg.__dict__) - + generateVersionFiles(cfg) # copy the wx locale message catalogs to the package dir cfg.build_locale_dir(opj(cfg.PKGDIR, 'locale')) From 44295bf9ebf7343a66c4aaa13ba7ef8e286b49cc Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 8 Jun 2023 23:11:51 -0700 Subject: [PATCH 09/21] More fixes for building an sdist in a clean folder --- build.py | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/build.py b/build.py index bc7f04eaa..0efc4a1e6 100755 --- a/build.py +++ b/build.py @@ -1586,18 +1586,20 @@ def cmd_build_wx(options, args): sys.exit(1) if not options.no_allmo: - # Build the wx message catalogs, but first check that there is a msgfmt - # command available - if findCmd('msgfmt') and findCmd('make'): - locale_pwd = pushDir(posixjoin(wxDir(), 'locale')) - print('Building message catalogs in ' + os.getcwd()) - runcmd('make allmo') - del locale_pwd - else: - print("WARNING: msgfmt and/or make commands not found, message catalogs not \n" - " rebuilt. Please install gettext and associated tools.") + make_allmo() +def make_allmo(): + # Build the wx message catalogs, but first check that there is a msgfmt + # command available + if findCmd('msgfmt') and findCmd('make'): + locale_pwd = pushDir(posixjoin(wxDir(), 'locale')) + print('Building message catalogs in ' + os.getcwd()) + runcmd('make allmo') + del locale_pwd + else: + print("WARNING: msgfmt and/or make commands not found, message catalogs not \n" + " rebuilt. Please install gettext and associated tools.") def copyWxDlls(options): if options.no_magic or options.use_syswx: @@ -2144,8 +2146,9 @@ def cmd_sdist(options, args): # Make a place to export everything to PDEST = 'build/sdist' - if not os.path.exists(PDEST): - os.makedirs(PDEST) + if os.path.exists(PDEST): + shutil.rmtree(PDEST) + os.makedirs(PDEST) # and a place to put the final tarball if not os.path.exists('dist'): @@ -2170,10 +2173,13 @@ def _archive_submodules(root, dest): _archive_submodules('.', os.path.abspath(PDEST)) generateVersionFiles(cfg) + # copy .py files that need to go into the root wx package dir + for name in ['src/__init__.py', 'src/gizmos.py',]: + copyFile(name, cfg.PKGDIR, verbose=True) # copy Phoenix's generated code into the archive tree msg('Copying generated files...') - os.mkdir(posixjoin(PDEST, 'sip', 'siplib')) + os.makedirs(posixjoin(PDEST, 'sip', 'siplib'), exist_ok=True) for srcdir in ['cpp', 'gen', 'siplib']: destdir = posixjoin(PDEST, 'sip', srcdir) for name in glob.glob(posixjoin('sip', srcdir, '*')): @@ -2197,6 +2203,8 @@ def _archive_submodules(root, dest): # Copy the locale message catalogs msg('Copying message catalog files...') + if not glob.glob(opj(cfg.WXDIR, 'locale', '*.mo')): + make_allmo() cfg.build_locale_dir(opj(cfg.PKGDIR, 'locale')) shutil.copytree(opj(cfg.PKGDIR, 'locale'), opj(PDEST, cfg.PKGDIR, 'locale')) @@ -2237,6 +2245,7 @@ def _archive_submodules(root, dest): msg('Cleaning up...') del pwd + os.chdir(phoenixDir()) shutil.rmtree(PDEST) if options.upload: From 951e81a1a235e9c0a8d141f61dbd20b39f84e65f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 8 Jun 2023 23:26:45 -0700 Subject: [PATCH 10/21] install gettext --- .github/workflows/ci-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 05ea6c8bc..8d07103ee 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -44,6 +44,7 @@ jobs: - name: Install dependencies run: | + apt-get install -y gettext python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade -r requirements.txt From b50e79d60db2e2b316579f2747b3eafba983881a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 9 Jun 2023 06:25:46 -0700 Subject: [PATCH 11/21] sudo --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 8d07103ee..3fb75be1a 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -44,7 +44,7 @@ jobs: - name: Install dependencies run: | - apt-get install -y gettext + sudo apt-get install -y gettext python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade -r requirements.txt From 14f8692adfd802ad242945efdbb6f76a2cb60ab1 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 9 Jun 2023 19:25:44 -0700 Subject: [PATCH 12/21] Add build-wheels job --- .github/workflows/ci-build.yml | 203 ++++++++++++++++++++------------- 1 file changed, 124 insertions(+), 79 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 3fb75be1a..d6b7d176a 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -7,23 +7,36 @@ name: ci-build on: + # Trigger on push or PRs targeting the master branch push: branches: [ 'master' ] pull_request: branches: [ 'master' ] + + # Also allow manual triggering (via web ui) workflow_dispatch: +# Cancel the workflow if another instance in the same workflow and PR is triggered +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read defaults: run: + # always use bash shell, even on windows shell: bash env: PYTHONUNBUFFERED: 1 +#--------------------------------------------------------------------------- + jobs: + # Build a wxPython source archive, and save it as an artifact for use in the + # job that builds the wheels. build-source-dist: runs-on: ubuntu-latest @@ -35,6 +48,7 @@ jobs: uses: actions/checkout@v3 with: submodules: 'recursive' + fetch-depth: 0 - name: Set up Python 3.10 uses: actions/setup-python@v4 @@ -64,82 +78,113 @@ jobs: #--------------------------------------------------------------------------- - # build-wheels: - # needs: build-source-dist - # strategy: - # matrix: - # os: [ubuntu-latest, windows-latest, macos-latest] - # python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] - # architecture: ['x86', 'x64'] - # # Exclude x86 configs on non-Windows OSs - # exclude: - # - os: ubuntu-latest - # architecture: x86 - # - os: macos-latest - # architecture: x86 - - # env: - # VERSION: ${{ needs.build-source-dist.outputs.VERSION }} - - # runs-on: ${{ matrix.os }} - - # steps: - # - name: Checkout repo - # uses: actions/checkout@v3 - # with: - # submodules: 'recursive' - - # - name: download CI source artifact - # uses: actions/download-artifact@v3 - # with: - # name: wxPython-source - # path: dist - - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v4 - # with: - # python-version: '${{ matrix.python-version }}' - # architecture: '${{ matrix.architecture }}' - # cache: 'pip' - - # - name: Install Python dependencies - # run: | - # python -m pip install --upgrade pip setuptools wheel - # python -m pip install --upgrade -r requirements.txt - - # - name: Install Ubuntu dependencies - # if: ${{ matrix.os }} == ubuntu-latest - # run: | - # apt-get install -y \ - # freeglut3 \ - # freeglut3-dev \ - # libgl1-mesa-dev \ - # libglu1-mesa-dev \ - # libgstreamer-plugins-base1.0-dev \ - # libgtk-3-dev \ - # libjpeg-dev \ - # libnotify-dev \ - # libsdl2-dev \ - # libsm-dev \ - # libtiff-dev \ - # libwebkit2gtk-4.0-dev \ - # libxtst-dev; - - # - name: Build wxPython wheel - # run: | - # cd dist - # pip wheel -v wxPython-${{ env.VERSION }}.tar.gz - - # - name: Simple smoke test - # run: | - # cd dist - # pip install wxPython-*.whl - # python -c "import wx; print(wx); print(wx.version()); print(wx.PlatformInfo)" - - # - name: Save wheel as job artifact - # uses: actions/upload-artifact@v3 - # # Just Windows and Macos - # if: ${{ matrix.os != 'ubuntu-latest' }} - # with: - # name: wxPython-wheel-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.architecture}} - # path: dist/wxPython-*.whl + # Use pip and the wxPython-source artifact to build a wxPython wheel for every + # supported Python version and architecture. + build-wheels: + # wait for prior job to complete + needs: build-source-dist + strategy: + matrix: + os: [ ubuntu-latest, windows-latest, macos-latest ] + # Start small while testing this job, when done remove the next 2 lines and + # uncomment the following ones. + python-version: [ '3.9', '3.10' ] + architecture: [ 'x64' ] + # python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ] + # architecture: [ 'x86', 'x64' ] + # # Exclude x86 configs on non-Windows OSs + # exclude: + # - os: ubuntu-latest + # architecture: x86 + # - os: macos-latest + # architecture: x86 + + env: + VERSION: ${{ needs.build-source-dist.outputs.VERSION }} + + runs-on: ${{ matrix.os }} + + outputs: + short_name: ${{ steps.init.outputs.short_name }} + cannonical_id: ${{ steps.init.outputs.cannonical_id }} + + steps: + - name: initialize variables + id: init + run: | + if [ ${{ matrix.os }} == ubuntu-latest ]; then + short_name=linux + elif [ ${{ matrix.os }} == macos-latest ]; then + short_name=macos + elif [ ${{ matrix.os }} == windows-latest ]; then + if [ ${{ matrix.architecture }} == x64 ]; then + short_name=win64 + else + short_name=win32 + fi + fi + echo "short_name=$short_name" >> "$GITHUB_OUTPUT" + echo "cannonical_id=$short_name-py${{ matrix.python-version }}-${{ matrix.architecture}}" >> "$GITHUB_OUTPUT" + + - name: Checkout repo + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: download CI source artifact + uses: actions/download-artifact@v3 + with: + name: wxPython-source + path: dist + + - name: Set up Python ${{ matrix.python-version }}-${{ matrix.architecture }} + uses: actions/setup-python@v4 + with: + python-version: '${{ matrix.python-version }}' + architecture: '${{ matrix.architecture }}' + cache: 'pip' + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade -r requirements.txt + + - name: Install Ubuntu dependencies + if: ${{ matrix.os }} == ubuntu-latest + run: | + sudo apt-get install -y \ + build-essential \ + freeglut3-dev \ + libcurl4-openssl-dev \ + libexpat1-dev \ + libgl1-mesa-dev \ + libglu1-mesa-dev \ + libgstreamer-plugins-bad1.0-dev \ + libgstreamer-plugins-base1.0-dev \ + libgtk-3-dev \ + libjpeg-dev \ + libnotify-dev \ + libsdl2-dev \ + libsm-dev \ + libtiff-dev \ + libwebkit2gtk-4.0-dev \ + libxtst-dev + + - name: Build the wxPython wheel + run: | + cd dist + pip wheel -v wxPython-${{ env.VERSION }}.tar.gz + + - name: Simple smoke test + run: | + cd dist + pip install wxPython-*.whl + python -c "import wx; print(wx); print(wx.version()); print(wx.PlatformInfo)" + + - name: Save wheel as job artifact + uses: actions/upload-artifact@v3 + # Just Windows and MacOS for now + if: ${{ matrix.os != 'ubuntu-latest' }} + with: + name: wxPython-wheel-${{ steps.init.outputs.cannonical_id }} + path: dist/wxPython-*.whl From 3076d8699d790cb1cbbf62abcd297a43950e6b6a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 9 Jun 2023 19:55:57 -0700 Subject: [PATCH 13/21] add apt update --- .github/workflows/ci-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index d6b7d176a..eee057cc1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -152,6 +152,7 @@ jobs: - name: Install Ubuntu dependencies if: ${{ matrix.os }} == ubuntu-latest run: | + sudo apt-get update sudo apt-get install -y \ build-essential \ freeglut3-dev \ From ee08bb4041a13fa14658aec58da8f4ed0cd15691 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 9 Jun 2023 21:01:28 -0700 Subject: [PATCH 14/21] Explicitly install libunwind-dev to workaround a package dependency bug --- .github/workflows/ci-build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index eee057cc1..d79694eb3 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -150,18 +150,15 @@ jobs: python -m pip install --upgrade -r requirements.txt - name: Install Ubuntu dependencies - if: ${{ matrix.os }} == ubuntu-latest + if: ${{ matrix.os == 'ubuntu-latest' }} run: | sudo apt-get update sudo apt-get install -y \ - build-essential \ freeglut3-dev \ libcurl4-openssl-dev \ libexpat1-dev \ libgl1-mesa-dev \ libglu1-mesa-dev \ - libgstreamer-plugins-bad1.0-dev \ - libgstreamer-plugins-base1.0-dev \ libgtk-3-dev \ libjpeg-dev \ libnotify-dev \ @@ -169,7 +166,11 @@ jobs: libsm-dev \ libtiff-dev \ libwebkit2gtk-4.0-dev \ - libxtst-dev + libxtst-dev \ + libunwind-dev \ + libgstreamer1.0-dev \ + libgstreamer-plugins-base1.0-dev + - name: Build the wxPython wheel run: | From 6ad8265073a0650e25a3403b60ea37d9bc715fb3 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 9 Jun 2023 21:04:29 -0700 Subject: [PATCH 15/21] Split the generate and the sdist step into 2 steps. --- .github/workflows/ci-build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index d79694eb3..ec4571ca3 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -62,13 +62,17 @@ jobs: python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade -r requirements.txt - - name: Generate code and create sdist + - name: Generate wrapper code id: generate run: | - python build.py setrev dox etg sip --nodoc sdist + python build.py setrev dox etg sip --nodoc VERSION=$(python build.py --quiet version) echo "version=$VERSION" >> "$GITHUB_OUTPUT" + - name: Create source distribution (sdist) + run: | + python build.py sdist + - name: Save sdist as job artifact uses: actions/upload-artifact@v3 with: From 856cb8e32e36c97399a64ef39010eeb141fd860f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 12 Jun 2023 16:20:31 -0700 Subject: [PATCH 16/21] fixes for building sdist on Windows, and also enable some additional MSVC info when building --- .gitignore | 1 + build.py | 36 ++++++++++++++++++++++------------- buildtools/build_wxwidgets.py | 8 ++++---- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 87b935dd4..14e46c466 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ mydbstub.py* .cache .vagrant .vscode +.env /build /tmp diff --git a/build.py b/build.py index 0efc4a1e6..8e12f4c40 100755 --- a/build.py +++ b/build.py @@ -797,6 +797,14 @@ def checkCompiler(quiet=False): arch = 'x64' if PYTHON_ARCH == '64bit' else 'x86' info = getMSVCInfo(PYTHON, arch, set_env=True) + if not quiet: + msg('MSVCinfo:') + msg(f' vc_ver: {info.vc_ver}') + msg(f' vs_ver: {info.vs_ver}') + msg(f' arch: {info.arch}') + msg(f' include: {info.include}') + msg(f' lib: {info.lib}') + msg(f' libpath: {info.libpath}') # Make sure there is now a cl.exe on the PATH CL = 'NOT FOUND' @@ -806,17 +814,16 @@ def checkCompiler(quiet=False): CL = p break if not quiet: - msg(f"CL.exe: {CL}") + msg(f' CL.exe: {CL}') # Just needed for debugging - # msg('include: ' + info.include) - # msg('lib: ' + info.lib) - # msg('libpath: ' + info.libpath) - # for d in info.include.split(os.pathsep): - # p = pathlib.Path(d, 'tchar.h') - # if p.exists(): - # msg('tchar.h: ' + str(p)) - # break + for d in info.include.split(os.pathsep): + p = pathlib.Path(d, 'tchar.h') + if p.exists(): + msg(f' tchar.h: {p}') + break + else: + msg('**** tchar.h NOT FOUND!') # NOTE: SIP is now generating code with scoped-enums. Older linux @@ -2149,6 +2156,7 @@ def cmd_sdist(options, args): if os.path.exists(PDEST): shutil.rmtree(PDEST) os.makedirs(PDEST) + TMP = os.path.abspath('build') # and a place to put the final tarball if not os.path.exists('dist'): @@ -2160,7 +2168,11 @@ def _archive_submodules(root, dest): if not os.path.exists(dest): os.path.makedirs(dest) pwd = pushDir(root) - runcmd('git archive HEAD | tar -x -C %s' % dest, echoCmd=False) + #runcmd('git archive HEAD | tar -x -C %s' % dest, echoCmd=False) + archive = opj(TMP, 'export.tar') + runcmd('git archive --format=tar -o %s HEAD' % archive) + runcmd('tar -C %s -xf %s' %(dest, archive)) + os.unlink(archive) if os.path.exists('.gitmodules'): with open('.gitmodules', 'rt') as fid: @@ -2183,10 +2195,8 @@ def _archive_submodules(root, dest): for srcdir in ['cpp', 'gen', 'siplib']: destdir = posixjoin(PDEST, 'sip', srcdir) for name in glob.glob(posixjoin('sip', srcdir, '*')): - try: + if not os.path.isdir(name): copyFile(name, destdir) - except IsADirectoryError: - pass sip_h_dir = posixjoin(cfg.PKGDIR, 'include', 'wxPython') copyFile(posixjoin(sip_h_dir, 'sip.h'), posixjoin(PDEST, sip_h_dir)) for wc in ['*.py', '*.pi', '*.pyi']: diff --git a/buildtools/build_wxwidgets.py b/buildtools/build_wxwidgets.py index ea57e19d1..973dbc46a 100644 --- a/buildtools/build_wxwidgets.py +++ b/buildtools/build_wxwidgets.py @@ -80,13 +80,13 @@ def getWxRelease(wxRoot=None): wxRoot = wxRootDir with open(os.path.join(wxRoot, "configure.in"), "r") as fid: configureText = fid.read() - majorVersion = re.search("wx_major_version_number=(\d+)", configureText).group(1) - minorVersion = re.search("wx_minor_version_number=(\d+)", configureText).group(1) + majorVersion = re.search(r"wx_major_version_number=(\d+)", configureText).group(1) + minorVersion = re.search(r"wx_minor_version_number=(\d+)", configureText).group(1) versionText = "%s.%s" % (majorVersion, minorVersion) if int(minorVersion) % 2: - releaseVersion = re.search("wx_release_number=(\d+)", configureText).group(1) + releaseVersion = re.search(r"wx_release_number=(\d+)", configureText).group(1) versionText += ".%s" % (releaseVersion) return versionText @@ -425,7 +425,7 @@ def main(wxDir, args): setupText = setupText.decode('utf-8') for flag in flags: - setupText, subsMade = re.subn(flag + "\s+?\d", "%s %s" % (flag, flags[flag]), setupText) + setupText, subsMade = re.subn(flag + r"\s+?\d", "%s %s" % (flag, flags[flag]), setupText) if subsMade == 0: print("Flag %s wasn't found in setup.h!" % flag) sys.exit(1) From e33187c86f223ba28c6ecca5b402ebb5e5b1c242 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 12 Jun 2023 16:27:56 -0700 Subject: [PATCH 17/21] Use ilammy/msvc-dev-cmd to set up MSVC --- .github/workflows/ci-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index ec4571ca3..616ea1755 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -175,6 +175,9 @@ jobs: libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: '${{ matrix.architecture }}' - name: Build the wxPython wheel run: | From 8a25bb607374dec52c44e0b2dd0a38ca63e46a8a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 12 Jun 2023 19:47:03 -0700 Subject: [PATCH 18/21] Comment out some no longer needed debug prints --- build.py | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/build.py b/build.py index 8e12f4c40..0611c9db8 100755 --- a/build.py +++ b/build.py @@ -797,14 +797,16 @@ def checkCompiler(quiet=False): arch = 'x64' if PYTHON_ARCH == '64bit' else 'x86' info = getMSVCInfo(PYTHON, arch, set_env=True) - if not quiet: - msg('MSVCinfo:') - msg(f' vc_ver: {info.vc_ver}') - msg(f' vs_ver: {info.vs_ver}') - msg(f' arch: {info.arch}') - msg(f' include: {info.include}') - msg(f' lib: {info.lib}') - msg(f' libpath: {info.libpath}') + + # # Just needed for debugging + # if not quiet: + # msg('MSVCinfo:') + # msg(f' vc_ver: {info.vc_ver}') + # msg(f' vs_ver: {info.vs_ver}') + # msg(f' arch: {info.arch}') + # msg(f' include: {info.include}') + # msg(f' lib: {info.lib}') + # msg(f' libpath: {info.libpath}') # Make sure there is now a cl.exe on the PATH CL = 'NOT FOUND' @@ -816,14 +818,14 @@ def checkCompiler(quiet=False): if not quiet: msg(f' CL.exe: {CL}') - # Just needed for debugging - for d in info.include.split(os.pathsep): - p = pathlib.Path(d, 'tchar.h') - if p.exists(): - msg(f' tchar.h: {p}') - break - else: - msg('**** tchar.h NOT FOUND!') + # # Just needed for debugging + # for d in info.include.split(os.pathsep): + # p = pathlib.Path(d, 'tchar.h') + # if p.exists(): + # msg(f' tchar.h: {p}') + # break + # else: + # msg('**** tchar.h NOT FOUND!') # NOTE: SIP is now generating code with scoped-enums. Older linux From 87b2a2e2094234eba8e838773f64c4bbcf0a0b8a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 12 Jun 2023 20:10:50 -0700 Subject: [PATCH 19/21] Add remaining matrix entries --- .github/workflows/ci-build.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 616ea1755..817bcd934 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -90,18 +90,14 @@ jobs: strategy: matrix: os: [ ubuntu-latest, windows-latest, macos-latest ] - # Start small while testing this job, when done remove the next 2 lines and - # uncomment the following ones. - python-version: [ '3.9', '3.10' ] - architecture: [ 'x64' ] - # python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ] - # architecture: [ 'x86', 'x64' ] - # # Exclude x86 configs on non-Windows OSs - # exclude: - # - os: ubuntu-latest - # architecture: x86 - # - os: macos-latest - # architecture: x86 + python-version: [ '3.8', '3.9', '3.10', '3.11' ] + architecture: [ 'x86', 'x64' ] + # Exclude x86 configs on non-Windows OSs + exclude: + - os: ubuntu-latest + architecture: x86 + - os: macos-latest + architecture: x86 env: VERSION: ${{ needs.build-source-dist.outputs.VERSION }} @@ -175,7 +171,8 @@ jobs: libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev - - uses: ilammy/msvc-dev-cmd@v1 + - name: Setup MSVC + uses: ilammy/msvc-dev-cmd@v1 with: arch: '${{ matrix.architecture }}' @@ -192,7 +189,8 @@ jobs: - name: Save wheel as job artifact uses: actions/upload-artifact@v3 - # Just Windows and MacOS for now + # Just Windows and MacOS for now, all we care about for Linux at this + # point is that the build was successful. if: ${{ matrix.os != 'ubuntu-latest' }} with: name: wxPython-wheel-${{ steps.init.outputs.cannonical_id }} From ef03e0f72b5613288f7646933933cf04dccc3985 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 12 Jun 2023 23:10:52 -0700 Subject: [PATCH 20/21] Uninstall wxPython at the end of the test, turn off fail-fast. --- .github/workflows/ci-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 817bcd934..39671c0e1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -88,6 +88,7 @@ jobs: # wait for prior job to complete needs: build-source-dist strategy: + fail-fast: false matrix: os: [ ubuntu-latest, windows-latest, macos-latest ] python-version: [ '3.8', '3.9', '3.10', '3.11' ] @@ -186,6 +187,7 @@ jobs: cd dist pip install wxPython-*.whl python -c "import wx; print(wx); print(wx.version()); print(wx.PlatformInfo)" + pip uninstall wxPython - name: Save wheel as job artifact uses: actions/upload-artifact@v3 From 4d4790d090680366b0635d191246e2007023377b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 13 Jun 2023 06:24:58 -0700 Subject: [PATCH 21/21] uninstall --yes --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 39671c0e1..90e6249bb 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -187,7 +187,7 @@ jobs: cd dist pip install wxPython-*.whl python -c "import wx; print(wx); print(wx.version()); print(wx.PlatformInfo)" - pip uninstall wxPython + pip uninstall --yes wxPython - name: Save wheel as job artifact uses: actions/upload-artifact@v3