Skip to content

Commit

Permalink
build: Small updates to build infrastructure (#6458)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Nov 27, 2024
1 parent 93040aa commit e2d948e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions scripts/conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions scripts/conda/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit e2d948e

Please sign in to comment.