[tor-commits] [torflow/master] We now support python2.6 or python2.7.
mikeperry at torproject.org
mikeperry at torproject.org
Mon Jun 1 05:37:43 UTC 2015
commit 9a9ed6921385870399dd9de460d649df71606156
Author: Mike Perry <mikeperry-git at torproject.org>
Date: Tue May 26 15:42:29 2015 -0700
We now support python2.6 or python2.7.
Adjust setup accordingly. Also bump other version deps.
---
NetworkScanners/BwAuthority/README.BwAuthorities | 7 ++----
NetworkScanners/BwAuthority/cron.sh | 1 -
NetworkScanners/BwAuthority/install-debs.sh | 27 ----------------------
NetworkScanners/BwAuthority/requirements.txt | 8 +++----
NetworkScanners/BwAuthority/run_scan.sh | 2 +-
NetworkScanners/BwAuthority/setup.sh | 15 +++++++-----
6 files changed, 16 insertions(+), 44 deletions(-)
diff --git a/NetworkScanners/BwAuthority/README.BwAuthorities b/NetworkScanners/BwAuthority/README.BwAuthorities
index fcf1f54..7e055b4 100644
--- a/NetworkScanners/BwAuthority/README.BwAuthorities
+++ b/NetworkScanners/BwAuthority/README.BwAuthorities
@@ -41,12 +41,9 @@ prepare a virtualenv, or run through the setup manually.
2.1. Scripted virtualenv setup
The easiest and most reliable setup method is to use the setup.sh script
-to install a python 2.6 virtual environment. This script will download all
+to install a python 2.6/2.7 virtual environment. This script will download all
of the dependencies and install them for you, but it will require that you
-have a copy of python2.6 installed and in your path.
-
-There is also a install-debs.sh script for Debian and Ubuntu systems that will
-handle python2.6 and some additional package dependency installation for you.
+have a copy of python2.6 or python2.7 installed and in your path.
2.2. Manual setup
diff --git a/NetworkScanners/BwAuthority/cron.sh b/NetworkScanners/BwAuthority/cron.sh
index d304031..26d4164 100755
--- a/NetworkScanners/BwAuthority/cron.sh
+++ b/NetworkScanners/BwAuthority/cron.sh
@@ -10,7 +10,6 @@ OUTPUT=$SCANNER_DIR/bwscan.V3BandwidthsFile
cd $SCANNER_DIR # Needed for import to work properly.
if [ -f bwauthenv/bin/activate ]
then
- echo "Using virtualenv..."
. bwauthenv/bin/activate
fi
$SCANNER_DIR/aggregate.py $SCANNER_DIR/data $OUTPUT
diff --git a/NetworkScanners/BwAuthority/install-debs.sh b/NetworkScanners/BwAuthority/install-debs.sh
deleted file mode 100755
index 8357d0b..0000000
--- a/NetworkScanners/BwAuthority/install-debs.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-if [ ! $(dpkg -s python2.6 python2.6-dev 2>/dev/null >/dev/null) ]
-then
- echo "We need python2.6 to be in the path. Press enter to try to install it."
- echo "or control-c and find your own way to install it and re-run this script"
- echo
- echo -n "Hit enter to install python2.6: "
- read
- sudo apt-get install python2.6 python2.6-dev
- if [ $? -ne 0 ]
- then
- echo
- echo "Your distribution does not natively provide python2.6."
- echo "Press enter to try to install from a ppa, or control-c to install on your own"
- echo
- echo -n "Hit enter to install from ppa:fkrull/deadsnakes: "
- read
- sudo apt-get install software-properties-common
- sudo add-apt-repository ppa:fkrull/deadsnakes
- sudo apt-get update
- sudo apt-get install python2.6 python2.6-dev
- fi
-fi
-
-sudo apt-get install libsqlite3-dev python-virtualenv
-sudo apt-get install autoconf2.13 automake make libevent-dev
diff --git a/NetworkScanners/BwAuthority/requirements.txt b/NetworkScanners/BwAuthority/requirements.txt
index 1cfee33..36999c4 100644
--- a/NetworkScanners/BwAuthority/requirements.txt
+++ b/NetworkScanners/BwAuthority/requirements.txt
@@ -19,11 +19,11 @@
#
# (Or, if you didn't install peep, do `$ pip install -r requirements.txt`.)
-# sha256: NUKQvRsYu2nhGUay2RP9mxXCpKp94uhWXSmUktt3NyE
-pysqlite==2.6.0
+# sha256: _pw1IWv1bIWLNMS0yL5-NFZt3vKWcOWltD-cuOz7so0
+pysqlite==2.6.3
-# sha256: tYgFyp-PUSPmCfJTqRboeh4-rERqCq4Sjt5jBIXI9AY
-SQLAlchemy==0.7.2
+# sha256: d6o51lydBD66a6Mps1n_hnQk_WxAO3wMsRK2XlB-HWY
+SQLAlchemy==0.7.10
# sha256: p-9DfyW1ROT3T7Mjb8Q80l9db-tgN918ZpMQRtdUOek
Elixir==0.7.1
diff --git a/NetworkScanners/BwAuthority/run_scan.sh b/NetworkScanners/BwAuthority/run_scan.sh
index 6406f64..d2674ec 100755
--- a/NetworkScanners/BwAuthority/run_scan.sh
+++ b/NetworkScanners/BwAuthority/run_scan.sh
@@ -51,7 +51,7 @@ fi
if [ -f bwauthenv/bin/activate ]
then
- echo "Using virtualenv..."
+ echo "Using virtualenv in bwauthenv..."
. bwauthenv/bin/activate
fi
diff --git a/NetworkScanners/BwAuthority/setup.sh b/NetworkScanners/BwAuthority/setup.sh
index 206f4a2..15ad931 100755
--- a/NetworkScanners/BwAuthority/setup.sh
+++ b/NetworkScanners/BwAuthority/setup.sh
@@ -3,18 +3,21 @@
SCANNER_DIR=$(dirname "$0")
SCANNER_DIR=$(readlink -f "$SCANNER_DIR")
-# 1. Install python2.6 if needed
-if [ -z "$(which python2.6)" ]
+PYTHON=$(which python2.6 || which python2.7)
+
+# 1. Install python if needed
+if [ -z "$(which $PYTHON)" ]
then
- echo "We need python2.6 to be in the path."
- echo "If you are on a Debian or Ubuntu system, you can try ./install-debs.sh"
+ echo "We need python2.6 or 2.7 to be in the path."
+ echo "If you are on a Debian or Ubuntu system, you can try: "
+ echo " sudo apt-get install python2.7 python2.7-dev libpython2.7-dev libsqlite3-dev python-virtualenv autoconf2.13 automake make libevent-dev"
exit 1
fi
if [ -z "$(which virtualenv)" ]
then
echo "We need virtualenv to be in the path. If you are on a debian system, try:"
- echo " sudo apt-get install libsqlite3-dev python-virtualenv"
+ echo " sudo apt-get install python-dev libsqlite3-dev python-virtualenv autoconf2.13 automake make libevent-dev"
exit 1
fi
@@ -39,7 +42,7 @@ fi
# 4. Initialize virtualenv
if [ ! -f bwauthenv/bin/activate ]
then
- virtualenv -p python2.6 bwauthenv
+ virtualenv -p $PYTHON bwauthenv
fi
source bwauthenv/bin/activate
More information about the tor-commits
mailing list