Merge pull request #1877 from freqtrade/eliminate_freqtradebin
[proposal] Eliminate bin/freqtrade
This commit is contained in:
commit
28c796a234
@ -1,7 +1,13 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
|
|
||||||
from freqtrade.main import main, set_loggers
|
from freqtrade.main import main, set_loggers
|
||||||
|
|
||||||
set_loggers()
|
set_loggers()
|
||||||
|
|
||||||
|
warnings.warn(
|
||||||
|
"Deprecated - To continue to run the bot like this, please run `pip install -e .` again.",
|
||||||
|
DeprecationWarning)
|
||||||
main(sys.argv[1:])
|
main(sys.argv[1:])
|
||||||
|
@ -6,10 +6,7 @@ To launch Freqtrade as a module
|
|||||||
> python -m freqtrade (with Python >= 3.6)
|
> python -m freqtrade (with Python >= 3.6)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from freqtrade import main
|
from freqtrade import main
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main.set_loggers()
|
main.main()
|
||||||
main.main(sys.argv[1:])
|
|
||||||
|
@ -27,7 +27,7 @@ class Arguments(object):
|
|||||||
Arguments Class. Manage the arguments received by the cli
|
Arguments Class. Manage the arguments received by the cli
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, args: List[str], description: str) -> None:
|
def __init__(self, args: Optional[List[str]], description: str) -> None:
|
||||||
self.args = args
|
self.args = args
|
||||||
self.parsed_arg: Optional[argparse.Namespace] = None
|
self.parsed_arg: Optional[argparse.Namespace] = None
|
||||||
self.parser = argparse.ArgumentParser(description=description)
|
self.parser = argparse.ArgumentParser(description=description)
|
||||||
|
@ -23,12 +23,15 @@ from freqtrade.worker import Worker
|
|||||||
logger = logging.getLogger('freqtrade')
|
logger = logging.getLogger('freqtrade')
|
||||||
|
|
||||||
|
|
||||||
def main(sysargv: List[str]) -> None:
|
def main(sysargv: List[str] = None) -> None:
|
||||||
"""
|
"""
|
||||||
This function will initiate the bot and start the trading loop.
|
This function will initiate the bot and start the trading loop.
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
set_loggers()
|
||||||
|
|
||||||
worker = None
|
worker = None
|
||||||
return_code = 1
|
return_code = 1
|
||||||
|
|
||||||
@ -64,5 +67,4 @@ def main(sysargv: List[str]) -> None:
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
set_loggers()
|
main()
|
||||||
main(sys.argv[1:])
|
|
||||||
|
6
setup.py
6
setup.py
@ -17,7 +17,6 @@ setup(name='freqtrade',
|
|||||||
author_email='michael.egger@tsn.at',
|
author_email='michael.egger@tsn.at',
|
||||||
license='GPLv3',
|
license='GPLv3',
|
||||||
packages=['freqtrade'],
|
packages=['freqtrade'],
|
||||||
scripts=['bin/freqtrade'],
|
|
||||||
setup_requires=['pytest-runner', 'numpy'],
|
setup_requires=['pytest-runner', 'numpy'],
|
||||||
tests_require=['pytest', 'pytest-mock', 'pytest-cov'],
|
tests_require=['pytest', 'pytest-mock', 'pytest-cov'],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
@ -43,6 +42,11 @@ setup(name='freqtrade',
|
|||||||
],
|
],
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
|
entry_points={
|
||||||
|
'console_scripts': [
|
||||||
|
'freqtrade = freqtrade.main:main',
|
||||||
|
],
|
||||||
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.6',
|
||||||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
||||||
|
Loading…
Reference in New Issue
Block a user