Skip to content

Commit

Permalink
py3-bokeh multiversion (#33407)
Browse files Browse the repository at this point in the history
  • Loading branch information
dannf authored Nov 9, 2024
1 parent d79cd9d commit f8b7243
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 28 deletions.
108 changes: 80 additions & 28 deletions py3-bokeh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,35 @@
package:
name: py3-bokeh
version: 3.6.1
epoch: 0
epoch: 1
description: Interactive plots and applications in the browser from Python
copyright:
- license: BSD-3-Clause
dependencies:
runtime:
- py3-jinja2
- py3-contourpy
- numpy
- py3-packaging
- py3-pandas
- py3-pillow
- py3-pyyaml
- py3-tornado
- py3-xyzservices
- python-3
provider-priority: 0

vars:
pypi-package: bokeh
import: bokeh

data:
- name: py-versions
items:
3.10: "310"
3.11: "311"
3.12: "312"
3.13: "300"

environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- py3-setuptools
- python-3
- py3-supported-cython
- py3-supported-pip
- py3-supported-python-dev
- py3-supported-setuptools-git-versioning
- wolfi-base

pipeline:
Expand All @@ -35,10 +39,69 @@ pipeline:
expected-sha256: 04d3fb5fac871423f38e4535838164cd90c3d32e707bcb74c8bf991ed28878fc
uri: https://files.pythonhosted.org/packages/source/b/bokeh/bokeh-${{package.version}}.tar.gz

- name: Python Build
uses: python/build-wheel
subpackages:
- range: py-versions
name: py${{range.key}}-${{vars.pypi-package}}
description: python${{range.key}} version of ${{vars.pypi-package}}
dependencies:
provider-priority: ${{range.value}}
runtime:
- py${{range.key}}-jinja2
- py${{range.key}}-contourpy
- py${{range.key}}-numpy
- py${{range.key}}-packaging
- py${{range.key}}-pandas
- py${{range.key}}-pillow
- py${{range.key}}-pyyaml
- py${{range.key}}-tornado
- py${{range.key}}-xyzservices
pipeline:
- uses: py/pip-build-install
with:
python: python${{range.key}}
- name: "move usr/bin executables for -bin"
runs: |
mkdir -p ./cleanup/${{range.key}}/
mv ${{targets.contextdir}}/usr/bin ./cleanup/${{range.key}}/
- uses: strip
test:
pipeline:
- uses: python/import
with:
python: python${{range.key}}
import: ${{vars.import}}

- range: py-versions
name: py${{range.key}}-${{vars.pypi-package}}-bin
description: Executable binaries for ${{vars.pypi-package}} installed for python${{range.key}}
dependencies:
runtime:
- py${{range.key}}-${{vars.pypi-package}}
provides:
- py3-${{vars.pypi-package}}-bin
- py3-${{vars.pypi-package}}
provider-priority: ${{range.value}}
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/usr/
mv ./cleanup/${{range.key}}/bin ${{targets.contextdir}}/usr/
test:
pipeline:
- runs: |
bokeh --version
bokeh --help
- uses: strip
- name: py3-supported-${{vars.pypi-package}}
description: meta package providing ${{vars.pypi-package}} for supported python versions.
dependencies:
runtime:
- py3.10-${{vars.pypi-package}}
test:
pipeline:
- uses: python/import
with:
python: python3.10
import: ${{vars.import}}

update:
enabled: true
Expand All @@ -48,16 +111,5 @@ update:
test:
pipeline:
- runs: |
LIBRARY="bokeh"
IMPORT_STATEMENT="import bokeh"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
bokeh --version
bokeh --help
109 changes: 109 additions & 0 deletions py3-setuptools-git-versioning.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Generated from https://pypi.org/project/setuptools-git-versioning/
package:
name: py3-setuptools-git-versioning
version: 2.0.0
epoch: 0
description: Use git repo data for building a version number according PEP-440
copyright:
- license: MIT
dependencies:
provider-priority: 0

pipeline:
- uses: git-checkout
with:
expected-commit: 1a2b9d0674b881e04b2a1238372b74020558274e
repository: https://github.com/dolfinus/setuptools-git-versioning
tag: v${{package.version}}

vars:
pypi-package: setuptools-git-versioning
import: setuptools_git_versioning

data:
- name: py-versions
items:
3.10: "310"
3.11: "311"
3.12: "312"
3.13: "300"

environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- py3-supported-cython
- py3-supported-pip
- py3-supported-python-dev
- py3-supported-toml
- wolfi-base

subpackages:
- range: py-versions
name: py${{range.key}}-${{vars.pypi-package}}
description: python${{range.key}} version of ${{vars.pypi-package}}
dependencies:
provider-priority: ${{range.value}}
provides:
- py3-${{vars.pypi-package}}
runtime:
- py${{range.key}}-packaging
- py${{range.key}}-setuptools
- py${{range.key}}-toml
pipeline:
- uses: py/pip-build-install
with:
python: python${{range.key}}
- name: "move usr/bin executables for -bin"
runs: |
mkdir -p ./cleanup/${{range.key}}/
mv ${{targets.contextdir}}/usr/bin ./cleanup/${{range.key}}/
- uses: strip
test:
pipeline:
- uses: python/import
with:
python: python${{range.key}}
import: ${{vars.import}}

- range: py-versions
name: py${{range.key}}-${{vars.pypi-package}}-bin
description: Executable binaries for ${{vars.pypi-package}} installed for python${{range.key}}
dependencies:
runtime:
- py${{range.key}}-${{vars.pypi-package}}
provides:
- py3-${{vars.pypi-package}}-bin
- py3-${{vars.pypi-package}}
provider-priority: ${{range.value}}
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/usr/
mv ./cleanup/${{range.key}}/bin ${{targets.contextdir}}/usr/
test:
pipeline:
- runs: setuptools-git-versioning --help

- name: py3-supported-${{vars.pypi-package}}
description: meta package providing ${{vars.pypi-package}} for supported python versions.
dependencies:
runtime:
- py3.10-${{vars.pypi-package}}
- py3.11-${{vars.pypi-package}}
- py3.12-${{vars.pypi-package}}
- py3.13-${{vars.pypi-package}}
test:
pipeline:
- uses: python/import
with:
python: python3.10
import: ${{vars.import}}

update:
enabled: true
manual: false
github:
identifier: dolfinus/setuptools-git-versioning
strip-prefix: v

0 comments on commit f8b7243

Please sign in to comment.