From 6029ec85b633d71b5476c5b41939497c007f2748 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 28 Jan 2020 11:31:31 +0200 Subject: [PATCH] Add python 3.7. Use general shebangs in scripts to test with python3; Use 2.7_with_system_site_packages for python2 to run qt tests as suggested in Travis doc instead of bypassing virtualenv by shebang. --- .travis.yml | 6 ++++-- checkdeps.py | 2 +- src/bitmessagemain.py | 2 +- src/tests/test_process.py | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 274d14c1..03a89471 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ language: python +cache: pip +dist: bionic python: - - "2.7" + - "2.7_with_system_site_packages" + - "3.7" addons: apt: packages: @@ -11,7 +14,6 @@ addons: - xvfb install: - pip install -r requirements.txt - - ln -s src pybitmessage # tests environment - python setup.py install script: - python checkdeps.py diff --git a/checkdeps.py b/checkdeps.py index 619cd668..66ce1a8f 100755 --- a/checkdeps.py +++ b/checkdeps.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python """ Check dependencies and give recommendations about how to satisfy them diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 8d511ae1..95a631b7 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.7 +#!/usr/bin/env python """ The PyBitmessage startup script """ diff --git a/src/tests/test_process.py b/src/tests/test_process.py index 3355ceaf..5e08ddd0 100644 --- a/src/tests/test_process.py +++ b/src/tests/test_process.py @@ -18,7 +18,7 @@ from common import cleanup def put_signal_file(path, filename): """Creates file, presence of which is a signal about some event.""" with open(os.path.join(path, filename), 'wb') as outfile: - outfile.write(str(time.time())) + outfile.write(b'%i' % time.time()) class TestProcessProto(unittest.TestCase):