Uncomment console_scripts in setup, make new start script for portable mode;

adjust tox and travis configuration.
This commit is contained in:
Dmitri Bogomolov 2020-07-13 13:19:35 +03:00
parent 525aa099f3
commit 89f490edbf
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
5 changed files with 6 additions and 16 deletions

View File

@ -18,5 +18,5 @@ install:
- export PYTHONWARNINGS=all - export PYTHONWARNINGS=all
script: script:
- python checkdeps.py - python checkdeps.py
- xvfb-run src/bitmessagemain.py -t - python -m pybitmessage.bitmessagemain -t
- python -bm tests - python -bm tests

View File

@ -3,7 +3,6 @@
import os import os
import platform import platform
import shutil import shutil
import sys
from setuptools import setup, Extension from setuptools import setup, Extension
from setuptools.command.install import install from setuptools.command.install import install
@ -166,9 +165,9 @@ if __name__ == "__main__":
], ],
'console_scripts': [ 'console_scripts': [
'pybitmessage = pybitmessage.bitmessagemain:main' 'pybitmessage = pybitmessage.bitmessagemain:main'
] if sys.platform[:3] == 'win' else [] ]
}, },
scripts=['src/pybitmessage'], # scripts=['src/pybitmessage'],
cmdclass={'install': InstallCmd}, cmdclass={'install': InstallCmd},
command_options={ command_options={
'build_sphinx': { 'build_sphinx': {

View File

@ -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)

2
start.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
python -m pybitmessage.bitmessagemain "$@"

View File

@ -9,7 +9,7 @@ setenv =
deps = -rrequirements.txt deps = -rrequirements.txt
commands = commands =
python checkdeps.py python checkdeps.py
coverage run -a src/bitmessagemain.py -t coverage run -a -m pybitmessage.bitmessagemain -t
coverage run -a -m tests coverage run -a -m tests
[testenv:reset] [testenv:reset]