From 89f490edbfa0c1d99d5b2a4701c45c5c8837a6c0 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Mon, 13 Jul 2020 13:19:35 +0300 Subject: [PATCH] Uncomment console_scripts in setup, make new start script for portable mode; adjust tox and travis configuration. --- .travis.yml | 2 +- setup.py | 5 ++--- src/pybitmessage | 11 ----------- start.sh | 2 ++ tox.ini | 2 +- 5 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 src/pybitmessage create mode 100755 start.sh diff --git a/.travis.yml b/.travis.yml index a1a314d9..0e84dd2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,5 +18,5 @@ install: - export PYTHONWARNINGS=all script: - python checkdeps.py - - xvfb-run src/bitmessagemain.py -t + - python -m pybitmessage.bitmessagemain -t - python -bm tests diff --git a/setup.py b/setup.py index 0de2eb8c..dd661784 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ import os import platform import shutil -import sys from setuptools import setup, Extension from setuptools.command.install import install @@ -166,9 +165,9 @@ if __name__ == "__main__": ], 'console_scripts': [ 'pybitmessage = pybitmessage.bitmessagemain:main' - ] if sys.platform[:3] == 'win' else [] + ] }, - scripts=['src/pybitmessage'], + # scripts=['src/pybitmessage'], cmdclass={'install': InstallCmd}, command_options={ 'build_sphinx': { diff --git a/src/pybitmessage b/src/pybitmessage deleted file mode 100644 index decebfff..00000000 --- a/src/pybitmessage +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python2.7 - -import os -import pkg_resources - -dist = pkg_resources.get_distribution('pybitmessage') -script_file = os.path.join(dist.location, dist.key, 'bitmessagemain.py') -new_globals = globals() -new_globals.update(__file__=script_file) - -execfile(script_file, new_globals) diff --git a/start.sh b/start.sh new file mode 100755 index 00000000..cf11e129 --- /dev/null +++ b/start.sh @@ -0,0 +1,2 @@ +#!/bin/sh +python -m pybitmessage.bitmessagemain "$@" diff --git a/tox.ini b/tox.ini index 211afd47..377280dc 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ setenv = deps = -rrequirements.txt commands = python checkdeps.py - coverage run -a src/bitmessagemain.py -t + coverage run -a -m pybitmessage.bitmessagemain -t coverage run -a -m tests [testenv:reset]