Skip to content

Commit

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

Please sign in to comment.