Skip to content

Commit 65eac6c

Browse files
committed
Final conversions for py3.6
1 parent 87841f4 commit 65eac6c

File tree

4 files changed

+8
-19
lines changed

4 files changed

+8
-19
lines changed

install-dev-dependencies.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ if type apt-get >/dev/null ; then
3434
BROWSERS="iceweasel chromium"
3535
CHROMEDRIVER="chromedriver"
3636
fi
37-
# In Debian, `python-` is assumed to be python 2.7, no need to specify - dkg
3837
$SUDO_SHIM apt-get install -y libxml2-dev libxml2-utils libxslt1-dev \
39-
python-dev $BROWSERS zip sqlite3 python-pip libcurl4-openssl-dev xvfb \
38+
python3.6-dev $BROWSERS zip sqlite3 python3-pip libcurl4-openssl-dev xvfb \
4039
libssl-dev git curl $CHROMEDRIVER
4140
if ! type geckodriver >/dev/null; then
4241
curl -LO "https://github.com/mozilla/geckodriver/releases/download/v0.17.0/geckodriver-v0.17.0-linux64.tar.gz"

make.sh

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if [ -n "$1" -a "$1" != "--remove-update-channel" ]; then
3131
git submodule update --recursive -f
3232
fi
3333

34-
VERSION=`python2.7 -c "import json ; print(json.loads(open('chromium/manifest.json').read())['version'])"`
34+
VERSION=`python3.6 -c "import json ; print(json.loads(open('chromium/manifest.json').read())['version'])"`
3535

3636
echo "Building version" $VERSION
3737

@@ -70,15 +70,15 @@ cp -a src/META-INF pkg/xpi-eff
7070

7171
# Remove the 'applications' manifest key from the crx version of the extension, change the 'author' string to a hash, and add the "update_url" manifest key
7272
# "update_url" needs to be present to avoid problems reported in https://bugs.chromium.org/p/chromium/issues/detail?id=805755
73-
python2.7 -c "import json; m=json.loads(open('pkg/crx/manifest.json').read()); m['author']={'email': 'eff.software.projects@gmail.com'}; del m['applications']; m['update_url'] = 'https://clients2.google.com/service/update2/crx'; open('pkg/crx/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))"
73+
python3.6 -c "import json; m=json.loads(open('pkg/crx/manifest.json').read()); m['author']={'email': 'eff.software.projects@gmail.com'}; del m['applications']; m['update_url'] = 'https://clients2.google.com/service/update2/crx'; open('pkg/crx/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))"
7474
# Remove the 'update_url' manifest key from the xpi version of the extension delivered to AMO
75-
python2.7 -c "import json; m=json.loads(open('pkg/xpi-amo/manifest.json').read()); del m['applications']['gecko']['update_url']; m['applications']['gecko']['id'] = 'https-everywhere@eff.org'; open('pkg/xpi-amo/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))"
75+
python3.6 -c "import json; m=json.loads(open('pkg/xpi-amo/manifest.json').read()); del m['applications']['gecko']['update_url']; m['applications']['gecko']['id'] = 'https-everywhere@eff.org'; open('pkg/xpi-amo/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))"
7676

7777
# If the --remove-update-channel flag is set, ensure the extension is unable to update
7878
if [ "$1" == "--remove-update-channel" -o "$2" == "--remove-update-channel" ]; then
7979
echo "Flag --remove-update-channel specified. Removing the XPI extensions' ability to update."
80-
python2.7 -c "import json; m=json.loads(open('pkg/xpi-amo/manifest.json').read()); m['applications']['gecko']['update_url'] = 'data:text/plain,'; open('pkg/xpi-amo/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))"
81-
python2.7 -c "import json; m=json.loads(open('pkg/xpi-eff/manifest.json').read()); m['applications']['gecko']['update_url'] = 'data:text/plain,'; open('pkg/xpi-eff/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))"
80+
python3.6 -c "import json; m=json.loads(open('pkg/xpi-amo/manifest.json').read()); m['applications']['gecko']['update_url'] = 'data:text/plain,'; open('pkg/xpi-amo/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))"
81+
python3.6 -c "import json; m=json.loads(open('pkg/xpi-eff/manifest.json').read()); m['applications']['gecko']['update_url'] = 'data:text/plain,'; open('pkg/xpi-eff/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))"
8282
fi
8383

8484
if [ -n "$BRANCH" ] ; then
@@ -170,16 +170,6 @@ cp $zip $xpi_eff
170170

171171
bash utils/android-push.sh "$xpi_eff"
172172

173-
#rm -rf pkg/crx
174-
175-
#python2.7 githubhelper.py $VERSION
176-
177-
#git add chromium/updates.xml
178-
#git commit -m "release $VERSION"
179-
#git tag -s chrome-$VERSION -m "release $VERSION"
180-
#git push
181-
#git push --tags
182-
183173
echo >&2 "Total included rules: `find src/chrome/content/rules -name "*.xml" | wc -l`"
184174
echo >&2 "Rules disabled by default: `find src/chrome/content/rules -name "*.xml" | xargs grep -F default_off | wc -l`"
185175

test/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Run Selenium tests for HTTPS Everywhere
44
#
5-
# This script may be executed as `python script.py [directory of CRX]`
5+
# This script may be executed as `python3.6 script.py [directory of CRX]`
66
#
77
# The script is compatible with Python 2. Python 3 is not tested.
88
# Selenium, WebDriver and Google Chrome (or Chromium) must be installed

utils/create_zip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Author: Yan Zhu, yan@mit.edu
55

66
"""
7-
Usage: python create_zip.py -x <exclusions> -n <name of zipped file> <directory>
7+
Usage: python3.6 create_zip.py -x <exclusions> -n <name of zipped file> <directory>
88
"""
99

1010
import argparse

0 commit comments

Comments
 (0)