[PATCH 1/9] cirrus: remove unused python3 arguments

1 view
Skip to first unread message

Rob Browning

unread,
Apr 9, 2025, 4:16:48 PM4/9/25
to bup-...@googlegroups.com, Johannes Berg
From: Johannes Berg <joha...@sipsolutions.net>

Signed-off-by: Johannes Berg <joha...@sipsolutions.net>
Reviewed-by: Rob Browning <r...@defaultvalue.org>
---
.cirrus.yml | 10 +++++-----
dev/prep-for-debianish-build | 6 ++----
dev/prep-for-freebsd-build | 17 +++--------------
dev/prep-for-macos-build | 16 +++-------------
4 files changed, 13 insertions(+), 36 deletions(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index 8e0baee0..ce4e1278 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -7,7 +7,7 @@ task:
memory: 2
script: |
set -xe
- dev/prep-for-debianish-build python3
+ dev/prep-for-debianish-build
export LANG=C.UTF-8
dev/system-info
BUP_PYTHON_CONFIG=python3-config ./configure --with-pylint=yes
@@ -24,7 +24,7 @@ task:
memory: 2
script: |
set -xe
- dev/prep-for-debianish-build python3
+ dev/prep-for-debianish-build
export LANG=C.UTF-8
DEBIAN_FRONTEND=noninteractive apt-get -y install bup
export BUP_TEST_OTHER_BUP="$(command -v bup)"
@@ -46,7 +46,7 @@ task:
memory: 2
script: |
set -xe
- dev/prep-for-debianish-build python3
+ dev/prep-for-debianish-build
export LANG=C.UTF-8
dev/system-info
adduser --disabled-password --gecos '' bup
@@ -65,7 +65,7 @@ task:
memory: 4
script: |
set -xe
- dev/prep-for-freebsd-build python3
+ dev/prep-for-freebsd-build
dev/system-info
gmake -j6 check
on_failure:
@@ -79,7 +79,7 @@ task:
image: ghcr.io/cirruslabs/macos-runner:sonoma
script: |
set -xe
- dev/prep-for-macos-build python3
+ dev/prep-for-macos-build
brew install bup
export BUP_TEST_OTHER_BUP="$(command -v bup)"
"$BUP_TEST_OTHER_BUP" version
diff --git a/dev/prep-for-debianish-build b/dev/prep-for-debianish-build
index 3a9941dd..5c9a98d2 100755
--- a/dev/prep-for-debianish-build
+++ b/dev/prep-for-debianish-build
@@ -2,13 +2,11 @@

set -euo pipefail

-usage() { echo "Usage: prep-for-debianish-build [python3 [pyxattr|xattr]]"; }
+usage() { echo "Usage: prep-for-debianish-build [pyxattr|xattr]"; }
misuse() { usage 1>&2; exit 2; }

-pyver="${1:-python3}"
-xattr="${2:-pyxattr}"
+xattr="${1:-pyxattr}"

-test "$pyver" = python3 || misuse
case "$xattr" in
pyxattr|xattr) ;;
*) misuse ;;
diff --git a/dev/prep-for-freebsd-build b/dev/prep-for-freebsd-build
index e563afbd..3652b761 100755
--- a/dev/prep-for-freebsd-build
+++ b/dev/prep-for-freebsd-build
@@ -4,11 +4,9 @@ set -exu

usage()
{
- echo "Usage: prep-for-freebsd-build [python3]"
+ echo "Usage: prep-for-freebsd-build"
}

-pyver="${1:-python3}"
-
# Install build deps
export ASSUME_ALWAYS_YES=yes
pkg update
@@ -18,14 +16,5 @@ pkg install rdiff-backup || true

pkgs='gmake git bash rsync curl par2cmdline readline duplicity'
pkgs="$pkgs rsnapshot hs-pandoc graphviz"
-
-case "$pyver" in
- python3)
- pkgs="$pkgs python311 py311-tornado py311-pytest py311-pytest-xdist"
- pkg install $pkgs
- ;;
- *)
- usage 1>&2
- exit 2
- ;;
-esac
+pkgs="$pkgs python311 py311-tornado py311-pytest py311-pytest-xdist"
+pkg install $pkgs
diff --git a/dev/prep-for-macos-build b/dev/prep-for-macos-build
index 0a31383c..700911bf 100755
--- a/dev/prep-for-macos-build
+++ b/dev/prep-for-macos-build
@@ -4,11 +4,9 @@ set -exu

usage()
{
- echo "Usage: prep-for-macos-build [python3]"
+ echo "Usage: prep-for-macos-build"
}

-pyver="${1:-python3}"
-
if ! command -v brew; then
/usr/bin/env \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@@ -21,13 +19,5 @@ brew install make bash par2 readline rsync pkg-config md5sha1sum
brew link --force readline
# "brew unlink readline" will undo this hack

-case "$pyver" in
- python3)
- brew install python
- python3 -m pip install --break-system-packages --user pytest pytest-xdist
- ;;
- *)
- usage 1>&2
- exit 2
- ;;
-esac
+brew install python
+python3 -m pip install --break-system-packages --user pytest pytest-xdist
--
2.47.2

Reply all
Reply to author
Forward
0 new messages