From 44b24bf902e551c615829d9bf37f01d7abbf344f Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:49:24 -0800 Subject: [PATCH 1/5] Do not write conda_build_config.yaml if it doesn't already exist. --- installers-conda/build_conda_pkgs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/installers-conda/build_conda_pkgs.py b/installers-conda/build_conda_pkgs.py index 975735d5cef..62b7e8dba5a 100644 --- a/installers-conda/build_conda_pkgs.py +++ b/installers-conda/build_conda_pkgs.py @@ -132,11 +132,11 @@ def _patch_source(self): def _patch_conda_build_config(self): file = self._fdstk_path / "recipe" / "conda_build_config.yaml" - if file.exists(): - contents = yaml.load(file.read_text()) - file.rename(file.parent / ("_" + file.name)) # copy of original - else: - contents = {} + if not file.exists(): + return + + contents = yaml.load(file.read_text()) + file.rename(file.parent / ("_" + file.name)) # copy of original pyver = sys.version_info contents['python'] = [f"{pyver.major}.{pyver.minor}.* *_cpython"] From eff7ef04e9dde56abc91c8c4c6ecf8ae7d6c4940 Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Mon, 9 Dec 2024 21:03:01 -0800 Subject: [PATCH 2/5] Do not create shortcuts while building conda package or installer. --- .github/workflows/installers-conda.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/installers-conda.yml b/.github/workflows/installers-conda.yml index 36dfa3e6a56..68dd44dac30 100644 --- a/.github/workflows/installers-conda.yml +++ b/.github/workflows/installers-conda.yml @@ -254,6 +254,8 @@ jobs: # built in workspace [[ -d build/conda-bld ]] && cp -Rv build/conda-bld $CONDA_BLD_PATH + export CONDA_SHORTCUTS=false # Don't create shortcuts while building + python build_conda_pkgs.py --build spyder - name: Create Local Conda Channel @@ -289,6 +291,8 @@ jobs: - name: Build Package Installer run: | + export CONDA_SHORTCUTS=false # Don't create shortcuts while building + [[ -n $CNAME ]] && args=("--cert-id" "$CNAME") || args=() python build_installers.py ${args[@]} From 2d68d4c9ff44887a6fb83be83e4e55ae18141055 Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:41:15 -0800 Subject: [PATCH 3/5] Update overloaded patch_recipe for SpyderCondaPkg to reflect the new multipackage output of the feedstock. Include system meta packages in spyder-base clobber requirements Note that the outputs section contains a list of mappings, therefore cannot be clobbered surgically like other header sections. Rather, the entire list of mappings must be reproduced except with the new run requirements. --- installers-conda/build_conda_pkgs.py | 44 +++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/installers-conda/build_conda_pkgs.py b/installers-conda/build_conda_pkgs.py index 62b7e8dba5a..705de96d000 100644 --- a/installers-conda/build_conda_pkgs.py +++ b/installers-conda/build_conda_pkgs.py @@ -273,27 +273,57 @@ def _patch_source(self): def patch_recipe(self): # Get current Spyder requirements - current_requirements = ['python'] - current_requirements += yaml.load( + spyder_base_reqs = ['python'] + spyder_base_reqs += yaml.load( REQ_MAIN.read_text())['dependencies'] if os.name == 'nt': win_requirements = yaml.load( REQ_WINDOWS.read_text())['dependencies'] - current_requirements += win_requirements - current_requirements.append('ptyprocess >=0.5') + spyder_base_reqs += win_requirements + spyder_base_reqs.append('ptyprocess >=0.5') elif sys.platform == 'darwin': mac_requirements = yaml.load( REQ_MAC.read_text())['dependencies'] if 'python.app' in mac_requirements: mac_requirements.remove('python.app') - current_requirements += mac_requirements + spyder_base_reqs += mac_requirements + spyder_base_reqs.append('__osx') else: linux_requirements = yaml.load( REQ_LINUX.read_text())['dependencies'] - current_requirements += linux_requirements + spyder_base_reqs += linux_requirements + spyder_base_reqs.append('__linux') + + spyder_reqs = [f"spyder-base =={self.version}"] + for req in spyder_base_reqs.copy(): + if req.startswith(('pyqt ', 'pyqtwebengine ', 'qtconsole ')): + spyder_reqs.append(req) + spyder_base_reqs.remove(req) + + if req.startswith('qtconsole '): + spyder_base_reqs.append( + req.replace('qtconsole', 'qtconsole-base') + ) self.recipe_clobber.update({ - "requirements": {"run": current_requirements} + "requirements": {"run": spyder_base_reqs}, + # Since outputs is a list, the entire list must be reproduced with + # the current run requirements + "outputs": [ + { + "name": "spyder-base" + }, + { + "name": "spyder", + "build": {"noarch": "python"}, + "requirements": {"run": spyder_reqs}, + "test": { + "requires": ["pip"], + "commands": ["spyder -h", "python -m pip check"], + "imports": ["spyder"] + } + } + ] }) super().patch_recipe() From b178af07669f93aff86772643be4931157c527f3 Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Sat, 14 Dec 2024 19:57:45 -0800 Subject: [PATCH 4/5] Use .conda package format --- .github/workflows/build-subrepos.yml | 6 +++++- .github/workflows/installers-conda.yml | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-subrepos.yml b/.github/workflows/build-subrepos.yml index 5307469ba22..ed57894829d 100644 --- a/.github/workflows/build-subrepos.yml +++ b/.github/workflows/build-subrepos.yml @@ -58,7 +58,7 @@ jobs: id: cache uses: actions/cache@v4 with: - path: installers-conda/build/conda-bld/**/*.tar.bz2 + path: installers-conda/build/conda-bld/**/*.conda key: ${{ matrix.pkg }}_${{ matrix.cache-arch }}_${{ matrix.python-version }}_${{ hashFiles(format('external-deps/{0}/.gitrepo', env.pkg)) }} lookup-only: true enableCrossOsArchive: true @@ -67,6 +67,10 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' uses: mamba-org/setup-micromamba@v1 with: + condarc: | + conda_build: + pkg_format: '2' + zstd_compression_level: '19' environment-file: installers-conda/build-environment.yml environment-name: spy-inst create-args: >- diff --git a/.github/workflows/installers-conda.yml b/.github/workflows/installers-conda.yml index 68dd44dac30..a9e9a2370b1 100644 --- a/.github/workflows/installers-conda.yml +++ b/.github/workflows/installers-conda.yml @@ -165,7 +165,7 @@ jobs: if: env.USE_SUBREPOS == 'true' uses: actions/cache/restore@v4 with: - path: installers-conda/build/conda-bld/**/*.tar.bz2 + path: installers-conda/build/conda-bld/**/*.conda key: python-lsp-server_noarch_${{ matrix.python-version }}_${{ hashFiles('external-deps/python-lsp-server/.gitrepo') }} enableCrossOsArchive: true fail-on-cache-miss: true @@ -174,7 +174,7 @@ jobs: if: env.USE_SUBREPOS == 'true' uses: actions/cache/restore@v4 with: - path: installers-conda/build/conda-bld/**/*.tar.bz2 + path: installers-conda/build/conda-bld/**/*.conda key: qtconsole_noarch_${{ matrix.python-version }}_${{ hashFiles('external-deps/qtconsole/.gitrepo') }} enableCrossOsArchive: true fail-on-cache-miss: true @@ -183,7 +183,7 @@ jobs: if: env.USE_SUBREPOS == 'true' uses: actions/cache/restore@v4 with: - path: installers-conda/build/conda-bld/**/*.tar.bz2 + path: installers-conda/build/conda-bld/**/*.conda key: spyder-kernels_${{ matrix.spyk-arch }}_${{ matrix.python-version }}_${{ hashFiles('external-deps/spyder-kernels/.gitrepo') }} enableCrossOsArchive: true fail-on-cache-miss: true @@ -262,8 +262,9 @@ jobs: run: | mkdir -p $CONDA_BLD_PATH conda config --set bld_path $CONDA_BLD_PATH + conda config --set conda_build.root-dir $CONDA_BLD_PATH conda index $CONDA_BLD_PATH - mamba search -c local --override-channels || true + conda search -c local --override-channels || true - name: Create Keychain if: runner.os == 'macOS' && env.NOTARIZE == 'true' From 3f7cb19a5a7eeb37e68c15080df5106cb4cb2ea6 Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:42:01 -0800 Subject: [PATCH 5/5] *** Revert immediately after release *** Use fork for source. --- installers-conda/build_conda_pkgs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installers-conda/build_conda_pkgs.py b/installers-conda/build_conda_pkgs.py index 705de96d000..60066d1793d 100644 --- a/installers-conda/build_conda_pkgs.py +++ b/installers-conda/build_conda_pkgs.py @@ -247,8 +247,8 @@ class SpyderCondaPkg(BuildCondaPkg): name = "spyder" norm = False source = os.environ.get('SPYDER_SOURCE', HERE.parent) - feedstock = "https://github.com/conda-forge/spyder-feedstock" - feedstock_branch = "dev" + feedstock = "https://github.com/mrclary/spyder-feedstock" + feedstock_branch = "spyder-base" shallow_ver = "v5.3.2" def _patch_source(self):