Skip to content

Commit

Permalink
supervisor: Lock dependencies to Python version it was built with/ins…
Browse files Browse the repository at this point in the history
…talls to (#36800)

<!---
Provide a short summary in the Title above. Examples of good PR titles:
* "ruby-3.1: new package"
* "haproxy: fix CVE-2014-123456"
-->

<!--
Please include references to any related issues or delete this section
otherwise.
 -->

Uses a similar approach to #28955 to express dependencies against
specific python version, since this is coupled at build time, avoiding
problems when a new, later python version is released, and the correct
setuptools is no longer installed via `py3-setuptools`.

- fixes #36785
  • Loading branch information
chadlwilson authored Dec 20, 2024
1 parent 4b3b716 commit 34d8a56
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions supervisor.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
package:
name: supervisor
version: 4.2.5
epoch: 6
epoch: 7
description: Supervisor process control system for Unix (supervisord)
copyright:
- license: BSD-3-Clause
dependencies:
runtime:
- py3-setuptools
- py${{vars.py-version}}-setuptools
- supervisor-config

vars:
py-version: 3.12

environment:
contents:
packages:
- busybox
- py3-pip
- python3
- py${{vars.py-version}}-pip
- python-${{vars.py-version}}

pipeline:
- uses: git-checkout
Expand All @@ -26,7 +29,7 @@ pipeline:

- name: Python Install
runs: |
sitepackages=$(python3 -c 'import site; print(site.getsitepackages()[0])')
sitepackages=$(python${{vars.py-version}} -c 'import site; print(site.getsitepackages()[0])')
concatenated_path="${{targets.destdir}}${sitepackages}"
echo "sitepackages=$sitepackages"
Expand Down Expand Up @@ -88,7 +91,7 @@ subpackages:
description: Precompiled Python bytecode for supervisor
pipeline:
- runs: |
sitepackages=$(python3 -c 'import site; print(site.getsitepackages()[0])')
sitepackages=$(python${{vars.py-version}} -c 'import site; print(site.getsitepackages()[0])')
destdir_concatenated_path="${{targets.destdir}}${sitepackages}"
subpkg_concatenated_path="${{targets.subpkgdir}}${sitepackages}"
mkdir -p "${subpkg_concatenated_path}/supervisor/__pycache__/"
Expand Down

0 comments on commit 34d8a56

Please sign in to comment.