diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 66a1d597b1..5574c1fdfb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -74,6 +74,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" + channels: "conda-forge" - name: conda setup run: | conda install -y anaconda-client @@ -120,7 +121,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 7a5b51080e..caaf5ffb67 100755 --- a/scripts/conda/build.sh +++ b/scripts/conda/build.sh @@ -4,12 +4,11 @@ set -euxo pipefail PACKAGE="holoviews" -python -m build . # Can add -w when this is solved: https://github.com/pypa/hatch/issues/1305 +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 2 mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.conda" dist diff --git a/scripts/conda/recipe/meta.yaml b/scripts/conda/recipe/meta.yaml index 8b94a418c6..115ceb8de8 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 %}