-
Notifications
You must be signed in to change notification settings - Fork 420
python dev #20318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
python dev #20318
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
015c54e
Make several core python packages build for mulitple python versions.
smoser d259615
Resolve the dependency loop.
f521184
Merge main
xnox 3a96413
Fun stuff
xnox 820e540
Revert "Fun stuff"
xnox 1df349d
Merge branch 'main' of https://github.com/wolfi-dev/os into python-dev
xnox 27b22d6
Drop pybins and allow to install them all
xnox 1aaf253
wip
xnox dc75866
Make several core python packages build for mulitple python versions.
smoser 0618e50
Resolve the dependency loop.
3697501
Some cleanups of things. pip-build-install-bootstrap simplifies.
3203659
Merge branch 'main' of https://github.com/wolfi-dev/os into python-dev
xnox 399b242
Upgrade setuptools
xnox 9164430
Test setuptools
xnox 35b2665
fixes
xnox 19004cf
tomli
xnox 54e9d98
foo
xnox 337ede8
Merge branch 'main' of https://github.com/wolfi-dev/os into python-dev
xnox 45b0e26
Add pip-zipapp.yaml file.
2daafb6
Merge branch 'python-dev' of https://github.com/smoser/wolfi-os into …
xnox 2c6030b
Merge branch 'main' of https://github.com/wolfi-dev/os into python-dev
xnox 634fa93
Remove no longer needed cython-0
xnox 68b9a2f
Split wheel binary into -bin subpackage
xnox a2c8c0e
Make py3-pip coinstallable
xnox 667f6a8
py3-supported-cython is not coinstallable, and not needed
xnox 3c0e1c7
Fix py3-tomli priorities
xnox 83eae21
py3-six fix up environment
xnox 038bf1f
Fix up py3-numpy
xnox 371edf6
Merge branch 'main' of https://github.com/wolfi-dev/os into python-dev
xnox 4ba63ea
Fixup py3-pathspec
xnox 2649591
Fixes
xnox 958c89d
Remove duplicate patch
xnox 6801483
Split numpy bins, in case something uses them
xnox 96125aa
Fixup gpep517 dist-info and binaries
xnox bc08d0f
Include some bootstrap wheels from pypi in pip-zipapp
ccee10b
py3-pip make update check ignore beta b tags
pnasrat 6cab0aa
py3-tomli epoch bump for merge
pnasrat 168bda5
Merge branch 'main' into python-dev
pnasrat 3710cfd
pip-zipapp lint clean
pnasrat 1f219d8
py3-cython: fix typo in provides cython
pnasrat 0f4779b
py3-cython fix spurious epoch bump
pnasrat bf6d717
Revert "Remove no longer needed cython-0"
pnasrat f4cfefb
py3-pyyaml: require py3-cython
pnasrat 0fcf539
python packages: simplify build env deps
pnasrat d419de5
Merge remote-tracking branch 'upstream/main' into python-dev
pnasrat ef27c60
py3-gpep517 explicit setuptools dep
pnasrat 8a0720d
py3-tomli don't use python/import
pnasrat dd74c20
py3-tomli fix typo
pnasrat 1b2313a
Merge branch 'main' into python-dev
xnox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Collect wheels built by a python pipeline | ||
|
|
||
| needs: | ||
| packages: | ||
| - util-linux | ||
|
|
||
| inputs: | ||
| dest: | ||
| description: the destination | ||
| default: ${{targets.subpkgdir}}/usr/share/wheels | ||
|
|
||
| pipeline: | ||
| - name: "pip build ${{inputs.python}}" | ||
| runs: | | ||
| found="" | ||
| set -- | ||
| for wheel in ./.wheels/*/*.whl; do | ||
| [ -f "$wheel" ] || continue | ||
| set -- "$@" "$wheel" | ||
| done | ||
| if [ $# -eq 0 ]; then | ||
| echo "No wheels found in $PWD/.wheels/*/*.whl" | ||
| exit 1 | ||
| fi | ||
| mkdir -p ${{inputs.dest}} | ||
| echo "Found wheels:" "$@" | ||
| sha256sum "$@" | ||
| cp -v "$@" "${{inputs.dest}}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: Setup, install and compile python | ||
|
|
||
| inputs: | ||
| python: | ||
| description: which python to use | ||
| required: true | ||
| dest: | ||
| description: the destination | ||
| default: ${{targets.subpkgdir}} | ||
|
|
||
| pipeline: | ||
| - name: "setup ${{inputs.python}}" | ||
| runs: | | ||
| ${{inputs.python}} setup.py install --no-compile --root="${{targets.subpkgdir}}" --prefix=/usr | ||
| rm -Rf build/ | ||
| - name: "compileall ${{inputs.python}}" | ||
| runs: | | ||
| ${{inputs.python}} -m compileall --invalidation-mode=unchecked-hash -r100 ${{targets.subpkgdir}}/usr/lib/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: Use pip from a zipapp for bootstrap. Only for use with bootstrapping. | ||
|
|
||
| needs: | ||
| packages: | ||
| - pip-zipapp | ||
|
|
||
| inputs: | ||
| python: | ||
| description: which python to use | ||
| required: true | ||
| wheel: | ||
| description: build a wheel? | ||
| required: false | ||
| default: true | ||
| dest: | ||
| description: the destination | ||
| default: ${{targets.subpkgdir}} | ||
|
|
||
| pipeline: | ||
| - name: "pip-bootstrap build" | ||
| runs: | | ||
| export SOURCE_DATE_EPOCH=315532800 | ||
| py=${{inputs.python}} | ||
| pipzip=/usr/share/pip-zipapp/pip-zipapp.pyz | ||
| [ -e "$pipzip" ] || { echo "missing pip-zip - $pipzip does not exist"; exit 1; } | ||
| [ -f "$pipzip" ] || { echo "missing pip-zip - $pipzip is not a file"; exit 1; } | ||
| pyver=$("$py" -c 'import sys; print("%s.%s" % (sys.version_info.major, sys.version_info.minor))') | ||
| sitepkgd=$("$py" -c 'import site; print(site.getsitepackages()[0])') | ||
| sitepkgd=${sitepkgd#/} | ||
| root=${{inputs.dest}} | ||
| wd="./.wheels/$pyver" | ||
| info() { echo "$@" 1>&2; } | ||
| vr() { info "execute:" "$@"; "$@"; } | ||
|
|
||
| tmpd=$(mktemp -d) | ||
| trap "rm -Rf '$tmpd'" EXIT | ||
|
|
||
| # --find-links to an empty dir and --no-index makes pip fully "offline" | ||
| distwheelsd="/usr/share/pip-zipapp/wheels" | ||
| mkdir -p "$distwheelsd" | ||
| info "$py is $pyver with site_packages dir '$sitepkgd'" | ||
|
|
||
| if [ "${{inputs.wheel}}" = "false" ]; then | ||
| info "skipping bdist-wheel" | ||
| vr "$py" "$pipzip" --python=/usr/bin/$py install --verbose --no-deps \ | ||
| "--find-links=$distwheelsd" --no-index \ | ||
| --force-reinstall --no-compile --prefix=/usr "--root=$root" . | ||
| else | ||
| vr "$py" "$pipzip" --python=/usr/bin/$py wheel --verbose "--wheel-dir=$wd" \ | ||
| "--find-links=$distwheelsd" --no-index --no-deps . | ||
| set -- "$wd"/*.whl | ||
| [ -f "$1" ] || { info "did not produce a wheel in $wd"; exit 1; } | ||
| info "produced $# wheels: $*" | ||
| vr "$py" "$pipzip" --python=/usr/bin/$py install --verbose \ | ||
| "--find-links=$distwheelsd" --no-index --no-build-isolation --no-deps \ | ||
| --force-reinstall --no-compile --prefix=/usr "--root=$root" "$@" | ||
| fi | ||
| vr $py -m compileall --invalidation-mode=unchecked-hash -r100 "$root/$sitepkgd" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Build and install python package with pip | ||
|
|
||
| inputs: | ||
| python: | ||
| description: which python to use | ||
| required: true | ||
| dest: | ||
| description: the destination | ||
| default: ${{targets.subpkgdir}} | ||
|
|
||
| pipeline: | ||
| - name: "pip build ${{inputs.python}}" | ||
| runs: | | ||
| export SOURCE_DATE_EPOCH=315532800 | ||
| py=${{inputs.python}} | ||
| pyver=$("$py" -c 'import sys; print("%s.%s" % (sys.version_info.major, sys.version_info.minor))') | ||
| sitepkgd=$("$py" -c 'import site; print(site.getsitepackages()[0])') | ||
| sitepkgd=${sitepkgd#/} | ||
| root=${{inputs.dest}} | ||
| wd="./.wheels/$pyver" | ||
| vr() { echo "execute:" "$@"; "$@"; } | ||
|
|
||
| tmpd=$(mktemp -d) | ||
| trap "rm -Rf '$tmpd'" EXIT | ||
|
|
||
| # --find-links to an empty dir and --no-index makes pip fully "offline" | ||
| distwheelsd="$tmpd/dist-wheels" | ||
| mkdir -p "$distwheelsd" | ||
| echo "$py is $pyver with site_packages dir '$sitepkgd'" | ||
| vr $py -m pip wheel --verbose "--wheel-dir=$wd" \ | ||
| "--find-links=$distwheelsd" --no-index --no-build-isolation --no-deps . | ||
| vr $py -m pip install --verbose \ | ||
| "--find-links=$distwheelsd" --no-index --no-build-isolation --no-deps \ | ||
| --force-reinstall --no-compile --prefix=/usr "--root=$root" "$wd"/*.whl | ||
| vr $py -m compileall --invalidation-mode=unchecked-hash -r100 "$root/$sitepkgd" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| package: | ||
| name: py3-cython | ||
| version: 3.0.10 | ||
| epoch: 1 | ||
| description: Cython is an optimising static compiler for both the Python & the extended Cython programming languages. | ||
| copyright: | ||
| - license: Apache-2.0 | ||
| dependencies: | ||
| provider-priority: 0 | ||
|
|
||
| vars: | ||
| pypi-package: cython | ||
|
|
||
| data: | ||
| - name: py-versions | ||
| items: | ||
| 3.10: "310" | ||
| 3.11: "311" | ||
| 3.12: "312" | ||
|
|
||
| environment: | ||
| contents: | ||
| packages: | ||
| - build-base | ||
| - busybox | ||
| - py3-supported-pip | ||
| - py3-supported-python-dev | ||
| - py3-supported-wheel | ||
|
|
||
| pipeline: | ||
| - uses: fetch | ||
| with: | ||
| expected-sha256: 00f97476cef9fcd9a89f9d2a49be3b518e1a74b91f377fe08c97fcb44bc0f7d7 | ||
| uri: https://github.com/cython/cython/archive/${{package.version}}.tar.gz | ||
|
|
||
| subpackages: | ||
| - range: py-versions | ||
| name: py${{range.key}}-${{vars.pypi-package}} | ||
| dependencies: | ||
| provider-priority: ${{range.value}} | ||
| provides: | ||
| - ${{package.name}} | ||
| - cython | ||
| pipeline: | ||
| - uses: py/pip-build-install | ||
| with: | ||
| python: python${{range.key}} | ||
| - uses: strip | ||
|
|
||
| - name: py3-wheels-${{vars.pypi-package}} | ||
| pipeline: | ||
| - uses: py/collect-wheels | ||
xnox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| update: | ||
| enabled: true | ||
| github: | ||
| identifier: cython/cython | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.