Solve problem with subprocess.call() on windows:
- uncomment console_scripts (only for windows) to get exe - replace call() with Popen() to avoid blocking
This commit is contained in:
parent
80831754b3
commit
affdb2fdc0
7
setup.py
7
setup.py
|
@ -2,6 +2,7 @@
|
|||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from setuptools import setup, Extension
|
||||
from setuptools.command.install import install
|
||||
|
@ -146,9 +147,9 @@ if __name__ == "__main__":
|
|||
'bitmessage.proxyconfig': [
|
||||
'stem = pybitmessage.plugins.proxyconfig_stem [tor]'
|
||||
],
|
||||
# 'console_scripts': [
|
||||
# 'pybitmessage = pybitmessage.bitmessagemain:main'
|
||||
# ]
|
||||
'console_scripts': [
|
||||
'pybitmessage = pybitmessage.bitmessagemain:main'
|
||||
] if sys.platform[:3] == 'win' else []
|
||||
},
|
||||
scripts=['src/pybitmessage'],
|
||||
cmdclass={'install': InstallCmd},
|
||||
|
|
|
@ -35,7 +35,9 @@ class TestProcessProto(unittest.TestCase):
|
|||
cls.flag = False
|
||||
cls.home = os.environ['BITMESSAGE_HOME'] = tempfile.gettempdir()
|
||||
put_signal_file(cls.home, 'unittest.lock')
|
||||
subprocess.call(cls._process_cmd) # nosec
|
||||
subprocess.Popen(
|
||||
cls._process_cmd,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) # nosec
|
||||
time.sleep(5)
|
||||
try:
|
||||
cls.pid = int(cls._get_readline('singleton.lock'))
|
||||
|
|
Reference in New Issue
Block a user