Skip to content

Commit

Permalink
Merge pull request #1962 from katomaso/feature/explicit-python2
Browse files Browse the repository at this point in the history
Python2 is explicitly stated as the interpreter
  • Loading branch information
BjarniRunar authored Feb 3, 2018
2 parents 0540112 + df6a849 commit 4f960a6
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 42 deletions.
52 changes: 26 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ submodules:
git submodule update --remote

docs: submodules
@python2 mailpile/urlmap.py |grep -v ^FIXME: >doc/URLS.md
@python2.7 mailpile/urlmap.py |grep -v ^FIXME: >doc/URLS.md
@ls -l doc/URLS.md
@python2 mailpile/defaults.py |grep -v -e ^FIXME -e ';timestamp' \
@python2.7 mailpile/defaults.py |grep -v -e ^FIXME -e ';timestamp' \
>doc/defaults.cfg
@ls -l doc/defaults.cfg

Expand All @@ -77,32 +77,32 @@ web: less js
alltests: clean pytests
@chmod go-rwx mailpile/tests/data/gpg-keyring
@DISPLAY= nosetests
@DISPLAY= python2 scripts/mailpile-test.py || true
@DISPLAY= python2.7 scripts/mailpile-test.py || true
@git checkout mailpile/tests/data/

pytests:
@echo -n 'security ' && python2 mailpile/security.py
@echo -n 'urlmap ' && python2 mailpile/urlmap.py -nomap
@echo -n 'search ' && python2 mailpile/search.py
@echo -n 'mailutils ' && python2 mailpile/mailutils/__init__.py
@echo -n 'mailutils.safe ' && python2 mailpile/mailutils/safe.py
@echo -n 'config/base ' && python2 mailpile/config/base.py
@echo -n 'config/validators' && python2 mailpile/config/validators.py
@echo -n 'config/manager ' && python2 mailpile/config/manager.py
@echo -n 'conn_brokers ' && python2 mailpile/conn_brokers.py
@echo -n 'crypto/mime ' && python2 mailpile/crypto/mime.py
@echo -n 'index.base ' && python2 mailpile/index/base.py
@echo -n 'index.msginfo ' && python2 mailpile/index/msginfo.py
@echo -n 'index.mailboxes ' && python2 mailpile/index/mailboxes.py
@echo -n 'index.search ' && python2 mailpile/index/search.py
@echo -n 'util ' && python2 mailpile/util.py
@echo -n 'vcard ' && python2 mailpile/vcard.py
@echo -n 'workers ' && python2 mailpile/workers.py
@echo -n 'packing ' && python2 mailpile/packing.py
@echo -n 'mailboxes/pop3 ' && python2 mailpile/mailboxes/pop3.py
@echo -n 'mail_source/imap ' && python2 mailpile/mail_source/imap.py
@echo -n 'crypto/aes_utils ' && python2 mailpile/crypto/aes_utils.py
@echo 'crypto/streamer...' && python2 mailpile/crypto/streamer.py
@echo -n 'security ' && python2.7 mailpile/security.py
@echo -n 'urlmap ' && python2.7 mailpile/urlmap.py -nomap
@echo -n 'search ' && python2.7 mailpile/search.py
@echo -n 'mailutils ' && python2.7 mailpile/mailutils/__init__.py
@echo -n 'mailutils.safe ' && python2.7 mailpile/mailutils/safe.py
@echo -n 'config/base ' && python2.7 mailpile/config/base.py
@echo -n 'config/validators' && python2.7 mailpile/config/validators.py
@echo -n 'config/manager ' && python2.7 mailpile/config/manager.py
@echo -n 'conn_brokers ' && python2.7 mailpile/conn_brokers.py
@echo -n 'crypto/mime ' && python2.7 mailpile/crypto/mime.py
@echo -n 'index.base ' && python2.7 mailpile/index/base.py
@echo -n 'index.msginfo ' && python2.7 mailpile/index/msginfo.py
@echo -n 'index.mailboxes ' && python2.7 mailpile/index/mailboxes.py
@echo -n 'index.search ' && python2.7 mailpile/index/search.py
@echo -n 'util ' && python2.7 mailpile/util.py
@echo -n 'vcard ' && python2.7 mailpile/vcard.py
@echo -n 'workers ' && python2.7 mailpile/workers.py
@echo -n 'packing ' && python2.7 mailpile/packing.py
@echo -n 'mailboxes/pop3 ' && python2.7 mailpile/mailboxes/pop3.py
@echo -n 'mail_source/imap ' && python2.7 mailpile/mail_source/imap.py
@echo -n 'crypto/aes_utils ' && python2.7 mailpile/crypto/aes_utils.py
@echo 'crypto/streamer...' && python2.7 mailpile/crypto/streamer.py
@echo

clean:
Expand Down Expand Up @@ -138,7 +138,7 @@ virtualenv: mp-virtualenv/bin/activate
virtualenv-dev: mp-virtualenv/bin/.dev

mp-virtualenv/bin/activate:
virtualenv -p python2 --system-site-packages mp-virtualenv
virtualenv -p python2.7 --system-site-packages mp-virtualenv
bash -c 'source mp-virtualenv/bin/activate && pip install -r requirements.txt && python setup.py install'
@rm -rf mp-virtualenv/bin/.dev
@echo
Expand Down
2 changes: 1 addition & 1 deletion mailpile/plugins/vcard_mork.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
#coding:utf-8
import sys
import re
Expand Down
2 changes: 1 addition & 1 deletion scripts/colorprints.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
#
# This is a small experiment in assigning colors to key fingerprints (or
# any other fingerprint).
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-debian-changelog.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python2.7
#This script builds a DCH changelog from the git commit log
from subprocess import check_output, call
from multiprocessing import Pool
Expand Down
2 changes: 1 addition & 1 deletion scripts/email-parsing-test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
#
# This is code which tries very hard to interpret the From:, To: and Cc:
# lines found in real-world e-mail addresses and make sense of them.
Expand Down
2 changes: 1 addition & 1 deletion scripts/mailpile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python2.7
import sys, os

# Make imports work without PYTHONPATH
Expand Down
2 changes: 1 addition & 1 deletion scripts/mailpile-admin
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
exec python "$(dirname $0)"/../shared-data/multipile/mailpile-admin.py "$@"
exec python2.7 "$(dirname $0)"/../shared-data/multipile/mailpile-admin.py "$@"
2 changes: 1 addition & 1 deletion scripts/mailpile-pyside.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python2.7
#
# This is a proof-of-concept quick hack, copy-pasted from code found here:
#
Expand Down
2 changes: 1 addition & 1 deletion scripts/mailpile-test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python2.7
#
# This script runs a set of black-box tests on Mailpile using the test
# messages found in `testing/`.
Expand Down
2 changes: 1 addition & 1 deletion scripts/mbox-minimal.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
import sys
import re

Expand Down
2 changes: 1 addition & 1 deletion scripts/mk-credits.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
import os
import re
import subprocess
Expand Down
2 changes: 1 addition & 1 deletion scripts/unsent-mail-finder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python2.7

import json
import sys
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/env python2.7
import datetime
import os
import re
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python2.7
from datetime import date
from setuptools import setup, find_packages
from setuptools.command.build_py import build_py
Expand Down
2 changes: 1 addition & 1 deletion shared-data/contrib/gui/gui-o-matic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2 -u
#!/usr/bin/env python2.7 -u
#
# This is a general-purpose GUI which can be configured and controlled
# using a very simple line-based (JSON) protocol.
Expand Down
2 changes: 1 addition & 1 deletion shared-data/contrib/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _real_startup(config):
script = os.path.join(script_dir, 'gui-o-matic.py')

global __GUI__
gui = __GUI__ = Popen(['python', '-u', script],
gui = __GUI__ = Popen(['python2.7', '-u', script],
bufsize=1, # line buffered
stdin=PIPE, stderr=PIPE,
long_running=True)
Expand Down
2 changes: 1 addition & 1 deletion shared-data/multipile/mailpile-admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python2.7
#
# This is the Mailpile admin tool! It can do these things:
#
Expand Down

0 comments on commit 4f960a6

Please sign in to comment.