From b0a9c9c6d48f7a021bdc7a2949cd104d8d609bd3 Mon Sep 17 00:00:00 2001 From: maho Date: Sat, 13 Apr 2019 06:26:20 +0200 Subject: [PATCH 1/2] - initial setup.py (issue #31) --- setup.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..1117f0f --- /dev/null +++ b/setup.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +from setuptools import setup, find_packages + + +setup(name='webrepl_cli', + version='0.20190413', + description='WebREPL client for MicroPython', + author=u'MicroPython Team', + author_email='contact@micropython.org', + url='https://github.com/micropython/webrepl', + scripts=["webrepl_cli.py"], + license="MIT", + keywords="micropython webrepl esp8266 esp32", + packages=find_packages(), + install_requires=[], + package_data={}) From 4c0494fb9b7a0145e98aa86b37d1c7ffdfbcb795 Mon Sep 17 00:00:00 2001 From: maho Date: Sat, 13 Apr 2019 06:55:47 +0200 Subject: [PATCH 2/2] - few renames to fix problems with import errors --- setup.py | 4 +++- webrepl_cli/__init__.py | 0 webrepl_cli.py => webrepl_cli/cli.py | 3 ++- websocket_helper.py => webrepl_cli/websocket_helper.py | 0 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 webrepl_cli/__init__.py rename webrepl_cli.py => webrepl_cli/cli.py (99%) rename websocket_helper.py => webrepl_cli/websocket_helper.py (100%) diff --git a/setup.py b/setup.py index 1117f0f..ee380e9 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,9 @@ author=u'MicroPython Team', author_email='contact@micropython.org', url='https://github.com/micropython/webrepl', - scripts=["webrepl_cli.py"], + entry_points={'console_scripts': [ + 'webrepl-cli = webrepl_cli.cli:main' + ]}, license="MIT", keywords="micropython webrepl esp8266 esp32", packages=find_packages(), diff --git a/webrepl_cli/__init__.py b/webrepl_cli/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/webrepl_cli.py b/webrepl_cli/cli.py similarity index 99% rename from webrepl_cli.py rename to webrepl_cli/cli.py index 55a9eea..fd5a0bc 100755 --- a/webrepl_cli.py +++ b/webrepl_cli/cli.py @@ -7,7 +7,8 @@ import usocket as socket except ImportError: import socket -import websocket_helper + +from webrepl_cli import websocket_helper # Define to 1 to use builtin "uwebsocket" module of MicroPython USE_BUILTIN_UWEBSOCKET = 0 diff --git a/websocket_helper.py b/webrepl_cli/websocket_helper.py similarity index 100% rename from websocket_helper.py rename to webrepl_cli/websocket_helper.py