Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion py3.12-pip.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: py3.12-pip
version: "24.0"
epoch: 0
epoch: 1
description: The PyPA recommended tool for installing Python packages.
copyright:
- license: MIT
Expand Down
2 changes: 1 addition & 1 deletion py3.12-setuptools.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: py3.12-setuptools
version: 69.1.1
epoch: 0
epoch: 1
description: Easily download, build, install, upgrade, and uninstall Python packages
copyright:
- license: "MIT"
Expand Down
83 changes: 59 additions & 24 deletions python-3.12.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package:
name: python-3.12
version: 3.12.2
epoch: 6
epoch: 7
description: "the Python programming language"
copyright:
- license: PSF-2.0
dependencies:
provides:
- python3=${{package.full-version}}
- python-3=${{package.full-version}}
runtime:
- ${{package.name}}-base=${{package.full-version}}

environment:
contents:
Expand Down Expand Up @@ -87,9 +93,12 @@ pipeline:
find ${{targets.destdir}}/usr/lib -type d -name 'idle_test' -exec rm -rf '{}' +

cd ${{targets.destdir}}/usr/bin
rm -f python3 pydoc3 idle3* 2to3*
rm -f idle3* 2to3*
rm ${{targets.destdir}}/usr/lib/libpython3.so

# add dubious python -> python3 link
ln -s python3 ${{targets.destdir}}/usr/bin/python

# Drop site-packages README.txt to avoid SCA dep on python3~3.M
cd ${{targets.destdir}}/usr/lib/${{vars.python}}
rm site-packages/README.txt
Expand All @@ -111,20 +120,30 @@ test:
${{vars.python}} CVE-2023-27043-unittest.py

subpackages:
- name: "${{package.name}}-default"
- name: "${{package.name}}-base"
description: "${{package.name}} as /usr/bin/python3"
dependencies:
provides:
- python3=${{package.full-version}}
- python-3=${{package.full-version}}
runtime:
- ${{package.name}}
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/bin
ln -sf ${{vars.python}} "${{targets.subpkgdir}}"/usr/bin/python3
ln -sf pydoc${{vars.pyversion}} "${{targets.subpkgdir}}"/usr/bin/pydoc3
ln -sf python3 "${{targets.subpkgdir}}"/usr/bin/python
mkdir -p ${{targets.subpkgdir}}/usr/bin ${{targets.subpkgdir}}/usr/lib
mv ${{targets.destdir}}/usr/bin/${{vars.python}} \
${{targets.destdir}}/usr/bin/pydoc${{vars.pyversion}} \
${{targets.subpkgdir}}/usr/bin
mv -v ${{targets.destdir}}/usr/lib/${{vars.python}} \
${{targets.subpkgdir}}/usr/lib
mv -v ${{targets.destdir}}/usr/lib/libpython${{vars.pyversion}}.so.* \
${{targets.subpkgdir}}/usr/lib

# pyconfig.h is needed at runtime... ugh.
d=usr/include/${{vars.python}}
mkdir -p "${{targets.subpkgdir}}"/$d
mv "${{targets.destdir}}"/$d/pyconfig.h "${{targets.subpkgdir}}"/$d/

# move usr/lib/python3.X/config-3.X-x86_64-linux-gnu
# back into main package so the -base-dev can take it below.
d="usr/lib/${{vars.python}}"
mkdir -p "${{targets.destdir}}/$d"
mv -v "${{targets.subpkgdir}}/$d"/config-${{vars.pyversion}}* \
"${{targets.destdir}}/$d"

- name: "${{package.name}}-doc"
description: "python3 documentation"
Expand All @@ -133,22 +152,38 @@ subpackages:

- name: "${{package.name}}-dev"
description: "python3 development headers"
dependencies:
provides:
- python3-dev=${{package.full-version}}
- python-3-dev=${{package.full-version}}
runtime:
- ${{package.name}}-base-dev=${{package.full-version}}
pipeline:
- uses: split/dev
- runs: |
# pyconfig.h is needed at runtime... ugh.
mkdir -p "${{targets.destdir}}"/usr/include/${{vars.python}}
mv "${{targets.subpkgdir}}"/usr/include/${{vars.python}}/pyconfig.h "${{targets.destdir}}"/usr/include/${{vars.python}}
mkdir -p ${{targets.subpkgdir}}/usr/bin
mv -v ${{targets.destdir}}/usr/bin/python3-config ${{targets.subpkgdir}}/usr/bin

d="usr/lib/pkgconfig"
mkdir -p "${{targets.subpkgdir}}/$d"
mv -v \
"${{targets.destdir}}"/$d/python3-embed.pc \
"${{targets.destdir}}"/$d/python3.pc \
"${{targets.subpkgdir}}/$d/"

- name: "${{package.name}}-dev-default"
description: "python3 by default with development headers"
- name: "${{package.name}}-base-dev"
description: "python3 development headers"
dependencies:
runtime:
- ${{package.name}}-dev
- ${{package.name}}-default
provides:
- python3-dev=${{package.full-version}}
- python-3-dev=${{package.full-version}}
- ${{package.name}}-base=${{package.full-version}}
pipeline:
- runs: |
# usr/lib/pytyon3.X/config-3.X-x86_64-linux-gnu
# split/dev will only move 2 files from it, but we want all of it.
d="usr/lib/${{vars.python}}"
mkdir -p "${{targets.subpkgdir}}/$d"
mv -v "${{targets.destdir}}"/$d/config-${{vars.pyversion}}* \
"${{targets.subpkgdir}}"/$d
- uses: split/dev

update:
enabled: true
Expand Down