Skip to content

Commit cbb3f5c

Browse files
author
ron.record
committed
Provide a more robust Python virtual environment installation of pip, bump release number
1 parent bebea53 commit cbb3f5c

File tree

6 files changed

+80
-8
lines changed

6 files changed

+80
-8
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
May 09, 2024 :
6+
RoonCommandLine version 2.1.0 release 6
7+
8+
This release provides a more robust Python virtual environment installation of pip:
9+
* If ensurepip Python module not available then download and run get-pip.py
10+
* Requires curl or wget
11+
512
May 08, 2024 :
613
RoonCommandLine version 2.1.0 release 5
714

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
VERSION=2.1.0
2-
RELEASE=5
2+
RELEASE=6

etc/postinstall

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,28 @@ ${PYTHON} -m venv ${ROON}/venv >/dev/null 2>&1
3737
# Make sure we have pip installed
3838
${PYTHON} -m ensurepip --upgrade >/dev/null 2>&1
3939
[ -x ${ROON}/venv/bin/pip ] || {
40-
${PYTHON} -m pip install --upgrade pip >/dev/null 2>&1
40+
PYOUT="/tmp/get-pip$$.py"
41+
PYURL="https://bootstrap.pypa.io/get-pip.py"
42+
have_curl=$(type -p curl)
43+
if [ "${have_curl}" ]; then
44+
curl -sSL -o ${PYOUT} ${PYURL}
45+
else
46+
have_wget=$(type -p wget)
47+
if [ "${have_wget}" ]; then
48+
wget -q -O ${PYOUT} ${PYURL}
49+
else
50+
echo "WARNING: Unable to locate curl or wget to download pip install script"
51+
fi
52+
fi
53+
if [ -f ${PYOUT} ]; then
54+
${PYTHON} ${PYOUT}
55+
else
56+
echo "WARNING: pip install script not found"
57+
fi
58+
rm -f ${PYOUT}
59+
}
60+
[ -x ${ROON}/venv/bin/pip ] || {
61+
echo "WARNING: ${ROON}/venv/bin/pip not found or not executable"
4162
}
4263

4364
${PYTHON} -m pip install ${PIPARGS} roonapi >/dev/null 2>&1

linInstall

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,28 @@ ${SUDO} ${PYTHON} -m venv ${ROON}/venv >/dev/null 2>&1
8686
# Make sure we have pip installed
8787
${SUDO} ${PYTHON} -m ensurepip --upgrade >/dev/null 2>&1
8888
[ -x ${ROON}/venv/bin/pip ] || {
89-
${SUDO} ${PYTHON} -m pip install --upgrade pip >/dev/null 2>&1
89+
PYOUT="/tmp/get-pip$$.py"
90+
PYURL="https://bootstrap.pypa.io/get-pip.py"
91+
have_curl=$(type -p curl)
92+
if [ "${have_curl}" ]; then
93+
curl -sSL -o ${PYOUT} ${PYURL}
94+
else
95+
have_wget=$(type -p wget)
96+
if [ "${have_wget}" ]; then
97+
wget -q -O ${PYOUT} ${PYURL}
98+
else
99+
echo "WARNING: Unable to locate curl or wget to download pip install script"
100+
fi
101+
fi
102+
if [ -f ${PYOUT} ]; then
103+
${SUDO} ${PYTHON} ${PYOUT}
104+
else
105+
echo "WARNING: pip install script not found"
106+
fi
107+
rm -f ${PYOUT}
108+
}
109+
[ -x ${ROON}/venv/bin/pip ] || {
110+
echo "WARNING: ${ROON}/venv/bin/pip not found or not executable"
90111
}
91112

92113
# Install the Python Roon API

macInstall

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,28 @@ ${SUDO} ${PYTHON} -m venv ${ROON}/venv >/dev/null 2>&1
4949
# Make sure we have pip installed
5050
${SUDO} ${PYTHON} -m ensurepip --upgrade >/dev/null 2>&1
5151
[ -x ${ROON}/venv/bin/pip ] || {
52-
${SUDO} ${PYTHON} -m pip install --upgrade pip >/dev/null 2>&1
52+
PYOUT="/tmp/get-pip$$.py"
53+
PYURL="https://bootstrap.pypa.io/get-pip.py"
54+
have_curl=$(type -p curl)
55+
if [ "${have_curl}" ]; then
56+
curl -sSL -o ${PYOUT} ${PYURL}
57+
else
58+
have_wget=$(type -p wget)
59+
if [ "${have_wget}" ]; then
60+
wget -q -O ${PYOUT} ${PYURL}
61+
else
62+
echo "WARNING: Unable to locate curl or wget to download pip install script"
63+
fi
64+
fi
65+
if [ -f ${PYOUT} ]; then
66+
${SUDO} ${PYTHON} ${PYOUT}
67+
else
68+
echo "WARNING: pip install script not found"
69+
fi
70+
rm -f ${PYOUT}
71+
}
72+
[ -x ${ROON}/venv/bin/pip ] || {
73+
echo "WARNING: ${ROON}/venv/bin/pip not found or not executable"
5374
}
5475

5576
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)

pkg/release.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# RoonCommandLine Release Notes
22

3+
RoonCommandLine version 2.1.0 release 6 provides a more robust Python virtual environment installation of pip
4+
35
RoonCommandLine version 2.1.0 release 5 ensures that pip is installed in the Python virtual environment
46

57
RoonCommandLine version 2.1.0 release 4 adds the capability to transfer the current queue from one Roon zone to another
@@ -22,18 +24,18 @@ The installation automatically detects and stores the Roon Core IP and port. The
2224

2325
**IMPORTANT NOTE** Older versions of RoonCommandLine will no longer function properly. In order to use RoonCommandLine you must install version 2.0.2 release 1 or later.
2426

25-
[Download the latest Debian or RPM package format release](https://github.com/doctorfree/RoonCommandLine/releases)
27+
Download the latest Debian or RPM package format release from the **Assets** section below.
2628

2729
Install the package on Debian based systems by executing the command
2830

2931
```bash
30-
sudo apt install ./RoonCommandLine_2.1.0-5.deb
32+
sudo apt install ./RoonCommandLine_2.1.0-6.deb
3133
```
3234

3335
Install the package on RPM based systems by executing the command
3436

3537
```bash
36-
sudo yum localinstall ./RoonCommandLine-2.1.0-5.rpm
38+
sudo yum localinstall ./RoonCommandLine-2.1.0-6.rpm
3739
```
3840

3941
Removal of the package on Debian based systems can be accomplished by issuing the command:
@@ -93,6 +95,6 @@ Version 2.0.7 release 1 added support for:
9395
- Add `get_zone_remaining` to get remaining time for now playing in zone
9496
- Add `get_zone_volume` and `get_zone_attributes.py`
9597

96-
View the full changelog for this release at <https://github.com/doctorfree/RoonCommandLine/blob/v2.1.0r5/CHANGELOG.md>
98+
View the full changelog for this release at <https://github.com/doctorfree/RoonCommandLine/blob/v2.1.0r6/CHANGELOG.md>
9799

98100
See [CHANGELOG.md](https://github.com/doctorfree/RoonCommandLine/blob/master/CHANGELOG.md) for a full list of changes in every RoonCommandLine release

0 commit comments

Comments
 (0)