drop requirements: mock, requests. merge [server] into the main requirement section
This commit is contained in:
parent
ed880be3e5
commit
10c1f8e1cf
3 changed files with 13 additions and 20 deletions
24
setup.py
24
setup.py
|
@ -39,31 +39,25 @@ setup(
|
|||
'aiorpcx==0.9.0',
|
||||
'coincurve',
|
||||
'pbkdf2',
|
||||
'cryptography'
|
||||
'cryptography',
|
||||
'attrs',
|
||||
'plyvel',
|
||||
'pylru'
|
||||
),
|
||||
extras_require={
|
||||
'test': (
|
||||
'mock',
|
||||
'requests',
|
||||
),
|
||||
'server': (
|
||||
'attrs',
|
||||
'plyvel',
|
||||
'pylru'
|
||||
),
|
||||
'ui': (
|
||||
'gui': (
|
||||
'pyside2',
|
||||
)
|
||||
},
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'torba-client=torba.client.cli:main',
|
||||
'torba-server=torba.server.cli:main [server]',
|
||||
'orchstr8=torba.orchstr8.cli:main [server]',
|
||||
'torba-server=torba.server.cli:main',
|
||||
'orchstr8=torba.orchstr8.cli:main',
|
||||
],
|
||||
'gui_scripts': [
|
||||
'torba=torba.ui:main [ui]',
|
||||
'torba-workbench=torba.workbench:main [ui]',
|
||||
'torba=torba.ui:main [gui]',
|
||||
'torba-workbench=torba.workbench:main [gui]',
|
||||
]
|
||||
}
|
||||
)
|
||||
|
|
Binary file not shown.
|
@ -9,8 +9,7 @@ import subprocess
|
|||
import importlib
|
||||
from binascii import hexlify
|
||||
from typing import Type, Optional
|
||||
|
||||
import requests
|
||||
import urllib.request
|
||||
|
||||
from torba.server.server import Server
|
||||
from torba.server.env import Env
|
||||
|
@ -256,9 +255,9 @@ class BlockchainNode:
|
|||
|
||||
if not os.path.exists(downloaded_file):
|
||||
self.log.info('Downloading: %s', self.latest_release_url)
|
||||
response = requests.get(self.latest_release_url, stream=True)
|
||||
with open(downloaded_file, 'wb') as f:
|
||||
shutil.copyfileobj(response.raw, f)
|
||||
with urllib.request.urlopen(self.latest_release_url) as response:
|
||||
with open(downloaded_file, 'wb') as out_file:
|
||||
shutil.copyfileobj(response, out_file)
|
||||
|
||||
self.log.info('Extracting: %s', downloaded_file)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue