Skip to content

Commit

Permalink
Provide a more robust Python virtual environment installation of pip,…
Browse files Browse the repository at this point in the history
… bump release number
  • Loading branch information
ron.record committed May 9, 2024
1 parent bebea53 commit cbb3f5c
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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

May 09, 2024 :
RoonCommandLine version 2.1.0 release 6

This release provides a more robust Python virtual environment installation of pip:
* If ensurepip Python module not available then download and run get-pip.py
* Requires curl or wget

May 08, 2024 :
RoonCommandLine version 2.1.0 release 5

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION=2.1.0
RELEASE=5
RELEASE=6
23 changes: 22 additions & 1 deletion etc/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,28 @@ ${PYTHON} -m venv ${ROON}/venv >/dev/null 2>&1
# Make sure we have pip installed
${PYTHON} -m ensurepip --upgrade >/dev/null 2>&1
[ -x ${ROON}/venv/bin/pip ] || {
${PYTHON} -m pip install --upgrade pip >/dev/null 2>&1
PYOUT="/tmp/get-pip$$.py"
PYURL="https://bootstrap.pypa.io/get-pip.py"
have_curl=$(type -p curl)
if [ "${have_curl}" ]; then
curl -sSL -o ${PYOUT} ${PYURL}
else
have_wget=$(type -p wget)
if [ "${have_wget}" ]; then
wget -q -O ${PYOUT} ${PYURL}
else
echo "WARNING: Unable to locate curl or wget to download pip install script"
fi
fi
if [ -f ${PYOUT} ]; then
${PYTHON} ${PYOUT}
else
echo "WARNING: pip install script not found"
fi
rm -f ${PYOUT}
}
[ -x ${ROON}/venv/bin/pip ] || {
echo "WARNING: ${ROON}/venv/bin/pip not found or not executable"
}

${PYTHON} -m pip install ${PIPARGS} roonapi >/dev/null 2>&1
Expand Down
23 changes: 22 additions & 1 deletion linInstall
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,28 @@ ${SUDO} ${PYTHON} -m venv ${ROON}/venv >/dev/null 2>&1
# Make sure we have pip installed
${SUDO} ${PYTHON} -m ensurepip --upgrade >/dev/null 2>&1
[ -x ${ROON}/venv/bin/pip ] || {
${SUDO} ${PYTHON} -m pip install --upgrade pip >/dev/null 2>&1
PYOUT="/tmp/get-pip$$.py"
PYURL="https://bootstrap.pypa.io/get-pip.py"
have_curl=$(type -p curl)
if [ "${have_curl}" ]; then
curl -sSL -o ${PYOUT} ${PYURL}
else
have_wget=$(type -p wget)
if [ "${have_wget}" ]; then
wget -q -O ${PYOUT} ${PYURL}
else
echo "WARNING: Unable to locate curl or wget to download pip install script"
fi
fi
if [ -f ${PYOUT} ]; then
${SUDO} ${PYTHON} ${PYOUT}
else
echo "WARNING: pip install script not found"
fi
rm -f ${PYOUT}
}
[ -x ${ROON}/venv/bin/pip ] || {
echo "WARNING: ${ROON}/venv/bin/pip not found or not executable"
}

# Install the Python Roon API
Expand Down
23 changes: 22 additions & 1 deletion macInstall
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,28 @@ ${SUDO} ${PYTHON} -m venv ${ROON}/venv >/dev/null 2>&1
# Make sure we have pip installed
${SUDO} ${PYTHON} -m ensurepip --upgrade >/dev/null 2>&1
[ -x ${ROON}/venv/bin/pip ] || {
${SUDO} ${PYTHON} -m pip install --upgrade pip >/dev/null 2>&1
PYOUT="/tmp/get-pip$$.py"
PYURL="https://bootstrap.pypa.io/get-pip.py"
have_curl=$(type -p curl)
if [ "${have_curl}" ]; then
curl -sSL -o ${PYOUT} ${PYURL}
else
have_wget=$(type -p wget)
if [ "${have_wget}" ]; then
wget -q -O ${PYOUT} ${PYURL}
else
echo "WARNING: Unable to locate curl or wget to download pip install script"
fi
fi
if [ -f ${PYOUT} ]; then
${SUDO} ${PYTHON} ${PYOUT}
else
echo "WARNING: pip install script not found"
fi
rm -f ${PYOUT}
}
[ -x ${ROON}/venv/bin/pip ] || {
echo "WARNING: ${ROON}/venv/bin/pip not found or not executable"
}

SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
Expand Down
10 changes: 6 additions & 4 deletions pkg/release.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# RoonCommandLine Release Notes

RoonCommandLine version 2.1.0 release 6 provides a more robust Python virtual environment installation of pip

RoonCommandLine version 2.1.0 release 5 ensures that pip is installed in the Python virtual environment

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

**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.

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

Install the package on Debian based systems by executing the command

```bash
sudo apt install ./RoonCommandLine_2.1.0-5.deb
sudo apt install ./RoonCommandLine_2.1.0-6.deb
```

Install the package on RPM based systems by executing the command

```bash
sudo yum localinstall ./RoonCommandLine-2.1.0-5.rpm
sudo yum localinstall ./RoonCommandLine-2.1.0-6.rpm
```

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

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

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

0 comments on commit cbb3f5c

Please sign in to comment.