From 2ab469e357579203bff521e4f135574f227fcb04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Thu, 28 Nov 2024 09:18:10 +0100 Subject: [PATCH] build: Small updates to build infrastructure --- .github/workflows/build.yaml | 3 ++- scripts/conda/build.sh | 6 ++---- scripts/conda/recipe/meta.yaml | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 41dcaa6fc..c3ee74a5d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -75,6 +75,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" + channels: "conda-forge" - name: conda setup run: | conda install -y anaconda-client @@ -121,7 +122,7 @@ jobs: - name: Install package run: python -m pip install dist/*.whl - name: Import package - run: python -c "import $PACKAGE; print($PACKAGE.__version__)" + run: python -c "import $PACKAGE; print($PACKAGE._version.__version__)" pip_publish: name: Publish PyPI diff --git a/scripts/conda/build.sh b/scripts/conda/build.sh index 0afee9aaf..6dfc29813 100755 --- a/scripts/conda/build.sh +++ b/scripts/conda/build.sh @@ -4,13 +4,11 @@ set -euxo pipefail PACKAGE="datashader" -python -m build . # No -w, to also get examples into conda package +python -m build --sdist . VERSION=$(python -c "import $PACKAGE; print($PACKAGE._version.__version__)") export VERSION -# conda config --env --set conda_build.pkg_format 2 -conda build scripts/conda/recipe --no-anaconda-upload --no-verify +conda build scripts/conda/recipe --no-anaconda-upload --no-verify -c conda-forge --package-format 1 -# mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.conda" dist mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.tar.bz2" dist diff --git a/scripts/conda/recipe/meta.yaml b/scripts/conda/recipe/meta.yaml index b7061717d..3f6471354 100644 --- a/scripts/conda/recipe/meta.yaml +++ b/scripts/conda/recipe/meta.yaml @@ -6,11 +6,11 @@ package: version: {{ VERSION }} source: - url: ../../../dist/{{ project["name"] }}-{{ VERSION }}-py3-none-any.whl + url: ../../../dist/{{ project["name"] }}-{{ VERSION }}.tar.gz build: noarch: python - script: {{ PYTHON }} -m pip install --no-deps -vv {{ project["name"] }}-{{ VERSION }}-py3-none-any.whl + script: {{ PYTHON }} -m pip install --no-deps -vv . entry_points: {% for group,epoints in project.get("entry_points",{}).items() %} {% for entry_point in epoints %}