-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build fix for debian installs (#352)
- Loading branch information
Showing
8 changed files
with
59 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
inst/ | ||
dist/ | ||
build/ | ||
.git/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,6 @@ | ||
#!/bin/bash -ex | ||
#!/bin/bash -e | ||
|
||
set -uo pipefail | ||
|
||
APK="apt-get -qqy" | ||
BUILDDEPS="gcc python3-dev musl-dev parallel" | ||
PIP3="pip3 -q --no-cache-dir install --upgrade" | ||
FROOT="/root/faucet" | ||
|
||
dir=$(dirname "$0") | ||
|
||
${APK} install git ${BUILDDEPS} | ||
"${dir}/retry_cmd" "${PIP3} pip" | ||
"${dir}/retry_cmd" "${PIP3} setuptools" | ||
"${dir}/retry_cmd" "${PIP3} wheel" | ||
"${dir}/retry_cmd" "${PIP3} -r ${FROOT}/requirements.txt" | ||
${PIP3} ${FROOT} | ||
|
||
for i in ${BUILDDEPS} ; do | ||
${APK} remove "$i" | ||
done | ||
bin/install_target /root/faucet | ||
|
||
# Smoke test | ||
faucet -V |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,9 @@ | ||
#!/bin/bash -e | ||
|
||
set -uo pipefail | ||
# The target install doesn't install the executable, so do that separately. | ||
pip3 install yq | ||
|
||
APK="apt-get -yqq" | ||
BUILDDEPS="gcc g++ python3-dev musl-dev parallel" | ||
TESTDEPS="bitstring pytest wheel virtualenv" | ||
PIP3="pip3 --no-cache-dir install --upgrade" | ||
FROOT="/root/forch" | ||
|
||
dir=$(dirname "$0") | ||
|
||
${APK} install git ${BUILDDEPS} | ||
${PIP3} pip | ||
${PIP3} setuptools | ||
${PIP3} setuptools ${TESTDEPS} | ||
${PIP3} -r ${FROOT}/etc/requirements.txt | ||
git init ${FROOT} | ||
${PIP3} ${FROOT} | ||
|
||
cp ${FROOT}/controller/bin/gauge_go /usr/bin/ | ||
|
||
pip3 uninstall -y ${TESTDEPS} || exit 1 | ||
for i in ${BUILDDEPS} ; do | ||
${APK} remove "$i" || exit 1 | ||
done | ||
bin/install_target /root/forch | ||
|
||
# Sanity check | ||
forch -V |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash -e | ||
|
||
set -uo pipefail | ||
|
||
if [[ -z $1 ]]; then | ||
echo Usage: $0 [target] | ||
false | ||
fi | ||
|
||
FROOT=$1 | ||
dir=$(dirname "$0") | ||
|
||
if [[ -f ${FROOT}/requirements.txt ]]; then | ||
REQUIREMENTS=${FROOT}/requirements.txt | ||
else | ||
REQUIREMENTS=${FROOT}/etc/requirements.txt | ||
fi | ||
|
||
APK="apt-get -qqy" | ||
BUILDDEPS="gcc python3-dev musl-dev parallel" | ||
${APK} install git ${BUILDDEPS} | ||
|
||
PIP3_BASE="pip3 -q --no-cache-dir install --upgrade" | ||
${dir}/retry_cmd "${PIP3_BASE} pip" | ||
|
||
# Some OS versions (e.g. Debian) don't always have site-packages in the | ||
# default search path, which is the default place where packages are installed. | ||
# Rather, install target into the distribution path so it will be always available. | ||
INST_DIR=`pip3 show pip | fgrep Location: | sed -e 's/Location: //'` | ||
echo Installing $FROOT into $INST_DIR | ||
PIP3="$PIP3_BASE -t $INST_DIR" | ||
|
||
${dir}/retry_cmd "${PIP3} setuptools" | ||
${dir}/retry_cmd "${PIP3} -r ${REQUIREMENTS}" | ||
|
||
# Installing target to the alternate install directory doesn't handle the bin/ | ||
# files, so first do the normal install and then replace/move with the new target. | ||
${PIP3_BASE} ${FROOT} | ||
${PIP3} ${FROOT} | ||
|
||
for i in ${BUILDDEPS} ; do | ||
${APK} remove "$i" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
coverage | ||
eventlet==0.25.1 | ||
grpcio | ||
grpcio-testing | ||
grpcio-tools | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters