From 5328322d7511f71ef25989cd5f754e18e95a9b0c Mon Sep 17 00:00:00 2001 From: bsteubing Date: Wed, 17 Jun 2026 18:28:05 -0500 Subject: [PATCH] Reverting to the previous approach (until May 7) --- .github/workflows/python-package-deploy.yml | 12 ++---------- .github/workflows/release.yaml | 9 +++------ recipe/meta.yaml | 5 ++--- setup.py | 7 +++++-- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/python-package-deploy.yml b/.github/workflows/python-package-deploy.yml index 841f6e3c7..8a9186388 100644 --- a/.github/workflows/python-package-deploy.yml +++ b/.github/workflows/python-package-deploy.yml @@ -34,8 +34,6 @@ jobs: build --user - name: Build a binary wheel and a source tarball - env: - VERSION: ${{ env.VERSION }} run: >- python -m build @@ -56,16 +54,10 @@ jobs: python-version: 3.11 activate-environment: build environment-file: .github/conda-envs/build.yml - conda-build-version: "*" - name: Build a Conda tarbal - env: - VERSION: ${{ env.VERSION }} run: | - export VERSION="${VERSION}" - echo "Building conda package with VERSION=${VERSION}" - conda build -c conda-forge -c cmutel -c lca -c mrvisscher ./recipe/ + conda build -c conda-forge -c cmutel -c lca ./recipe/ - name: Publish to Anaconda run: | anaconda -t ${{ secrets.CONDA_LCA }} upload \ - /usr/share/miniconda/conda-bld/noarch/*.conda - + /usr/share/miniconda/envs/build/conda-bld/noarch/*.conda diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e12398953..67850064d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,17 +31,14 @@ jobs: python-version: 3.11 activate-environment: build environment-file: .github/conda-envs/build.yml - conda-build-version: "*" - name: Build activity-browser stable env: VERSION: ${{ github.ref_name }} run: | - export VERSION="${VERSION}" - echo "Building conda package with VERSION=${VERSION}" - conda build -c conda-forge -c cmutel -c lca -c mrvisscher recipe/ + conda build -c conda-forge -c cmutel -c lca recipe/ - name: Upload to anaconda.org run: | anaconda -t ${{ secrets.CONDA_UPLOAD_TOKEN }} upload \ - /usr/share/miniconda/conda-bld/noarch/*.conda + /usr/share/miniconda/envs/build/conda-bld/noarch/*.conda - name: Update wiki - run: ./.github/scripts/update_wiki.sh "Automated documentation update for $GITHUB_REF_NAME" "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file + run: ./.github/scripts/update_wiki.sh "Automated documentation update for $GITHUB_REF_NAME" "${{ secrets.GITHUB_TOKEN }}" diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8ada022bd..f2dee85ba 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,7 +1,6 @@ -{% set ab_version = os.environ.get('VERSION', 'dev') %} package: name: activity-browser - version: {{ ab_version }} + version: "{{ os.environ.get('VERSION', 'dev') }}" source: path: .. @@ -9,7 +8,7 @@ source: build: noarch: python number: 0 - script: export VERSION="{{ ab_version }}" && {{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt + script: "{{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt" entry_points: - activity-browser = activity_browser:run_activity_browser - activity-browser-cleanup = activity_browser.bwutils:cleanup diff --git a/setup.py b/setup.py index f13ea9d5f..407e7b459 100644 --- a/setup.py +++ b/setup.py @@ -2,8 +2,11 @@ import os from setuptools import setup -version = os.environ.get("VERSION") or os.environ.get("PKG_VERSION") -if not version: +if "VERSION" in os.environ: + version = os.environ["VERSION"] +elif "PKG_VERSION" in os.environ: + version = os.environ["PKG_VERSION"] +else: version = os.environ.get("GIT_DESCRIBE_TAG", "0.0.0") if "-" in version: versions = version.split("-")