Skip to content

Commit

Permalink
Add python versioned py3-pycparser (#26681)
Browse files Browse the repository at this point in the history
Signed-off-by: Srishti Hegde <[email protected]>
  • Loading branch information
srishtih authored Aug 19, 2024
1 parent e83e7a8 commit c800079
Showing 1 changed file with 39 additions and 24 deletions.
63 changes: 39 additions & 24 deletions py3-pycparser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,65 @@
package:
name: py3-pycparser
version: "2.22"
epoch: 1
epoch: 2
description: C parser in Python
copyright:
- license: BSD-3-Clause
dependencies:
runtime:
- python3
provider-priority: 0

environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- py3-setuptools
- python3
- py3-supported-installer
- py3-supported-pip
- py3-supported-pytest
- py3-supported-python
- py3-supported-setuptools
- py3-supported-wheel
- wolfi-base

vars:
pypi-package: pycparser

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

pipeline:
- uses: git-checkout
with:
repository: https://github.com/eliben/pycparser
tag: release_v${{package.version}}
expected-commit: 129d32ef805d715d90a3b2035b13168c17ca63d2

- name: Python Build
runs: python setup.py build

- name: Python Install
runs: python setup.py install --prefix=/usr --root="${{targets.destdir}}"

- name: Python Unit Test
runs: python setup.py test -s tests

- uses: strip
subpackages:
- range: py-versions
name: py${{range.key}}-${{vars.pypi-package}}
description: ${{vars.pypi-package}} installed for python${{range.key}}
dependencies:
provides:
- py3-${{vars.pypi-package}}
provider-priority: ${{range.value}}
pipeline:
- uses: py/pip-build-install
with:
python: python${{range.key}}
- runs: |
python${{range.key}} -m pytest tests/
- uses: strip
test:
pipeline:
- uses: python/import
with:
python: python${{range.key}}
import: ${{vars.pypi-package}}

update:
enabled: true
Expand All @@ -47,12 +71,3 @@ update:
identifier: eliben/pycparser
strip-prefix: release_v
use-tag: true

test:
environment:
contents:
packages:
- python3
pipeline:
- runs: |
python -c "import pycparser; print(pycparser.__version__)"

0 comments on commit c800079

Please sign in to comment.