From f8b7243e910ed2ad825aa954c664ded89fb1de4f Mon Sep 17 00:00:00 2001 From: dann frazier Date: Fri, 8 Nov 2024 18:26:01 -0700 Subject: [PATCH] py3-bokeh multiversion (#33407) --- py3-bokeh.yaml | 108 ++++++++++++++++++++-------- py3-setuptools-git-versioning.yaml | 109 +++++++++++++++++++++++++++++ 2 files changed, 189 insertions(+), 28 deletions(-) create mode 100644 py3-setuptools-git-versioning.yaml diff --git a/py3-bokeh.yaml b/py3-bokeh.yaml index ac9cd691075..6606f74a32c 100644 --- a/py3-bokeh.yaml +++ b/py3-bokeh.yaml @@ -2,22 +2,24 @@ 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: @@ -25,8 +27,10 @@ environment: - 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: @@ -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 @@ -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 diff --git a/py3-setuptools-git-versioning.yaml b/py3-setuptools-git-versioning.yaml new file mode 100644 index 00000000000..6523760c625 --- /dev/null +++ b/py3-setuptools-git-versioning.yaml @@ -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