Skip to content

Commit

Permalink
build: Small updates to build infrastructure (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Nov 27, 2024
1 parent 5cca1c8 commit 8007936
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,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 @@ -125,7 +126,7 @@ jobs:
- name: Install package
run: python -m pip install dist/*.whl
- name: Test 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
13 changes: 7 additions & 6 deletions geoviews/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ raw-options = { version_scheme = "no-guess-dev" }

[tool.hatch.build.targets.wheel]
include = ["geoviews"]
exclude = ["geoviews/node_modules"]

[tool.hatch.build.targets.wheel.force-include]
"geoviews/dist" = "geoviews/dist"

[tool.hatch.build.targets.sdist]
include = ["geoviews", "scripts"]
exclude = ["geoviews/node_modules"]

[tool.hatch.build.targets.sdist.force-include]
"geoviews/dist" = "geoviews/dist"
Expand Down
8 changes: 4 additions & 4 deletions scripts/conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euxo pipefail

PACKAGE="geoviews"

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
Expand All @@ -14,13 +14,13 @@ import bokeh
from packaging.version import Version
if Version(bokeh.__version__).is_prerelease:
print('bokeh/label/dev')
print('bokeh/label/rc')
else:
print('bokeh')
")

conda build scripts/conda/recipe-core --no-anaconda-upload --no-verify -c "$BK_CHANNEL" -c pyviz
conda build scripts/conda/recipe-recommended --no-anaconda-upload --no-verify -c "$BK_CHANNEL" -c pyviz
conda build scripts/conda/recipe-core --no-anaconda-upload --no-verify -c pyviz -c "$BK_CHANNEL" -c conda-forge --package-format 1
conda build scripts/conda/recipe-recommended --no-anaconda-upload --no-verify -c pyviz -c "$BK_CHANNEL" -c conda-forge --package-format 1

mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-core-$VERSION-py_0.tar.bz2" dist
mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.tar.bz2" dist
4 changes: 2 additions & 2 deletions scripts/conda/recipe-core/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
2 changes: 1 addition & 1 deletion scripts/conda/recipe-recommended/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package:
version: {{ VERSION }}

source:
url: ../../../dist/{{ project["name"] }}-{{ VERSION }}-py3-none-any.whl
url: ../../../dist/{{ project["name"] }}-{{ VERSION }}.tar.gz

build:
noarch: python
Expand Down

0 comments on commit 8007936

Please sign in to comment.