mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-25 02:47:27 +08:00
releae with setuptools, fix some help text
This commit is contained in:
@@ -8,7 +8,7 @@ from odrive.enums import * # pylint: disable=W0614
|
||||
|
||||
def print_banner():
|
||||
print('Please connect your ODrive.')
|
||||
print('Type help() for help.')
|
||||
print('You can also type help() or quit().')
|
||||
|
||||
def print_help(args):
|
||||
print('')
|
||||
|
||||
@@ -9,7 +9,6 @@ import threading
|
||||
import platform
|
||||
import subprocess
|
||||
import os
|
||||
from odrive.utils import Event
|
||||
|
||||
try:
|
||||
if platform.system() == 'Windows':
|
||||
|
||||
+11
-9
@@ -81,22 +81,24 @@ else:
|
||||
|
||||
logger = Logger(verbose=args.verbose)
|
||||
|
||||
print("ODrive control utility v" + odrive.__version__)
|
||||
if ".dev" in odrive.__version__:
|
||||
print("")
|
||||
logger.warn("Developer Preview")
|
||||
print(" If you find issues, please report them")
|
||||
print(" on https://github.com/madcowswe/ODrive/issues")
|
||||
print(" or better yet, submit a pull request to fix it.")
|
||||
print("")
|
||||
def print_version():
|
||||
print("ODrive control utility v" + odrive.__version__)
|
||||
|
||||
app_shutdown_token = Event()
|
||||
|
||||
try:
|
||||
if args.version == True:
|
||||
pass
|
||||
print_version()
|
||||
|
||||
elif args.command == 'shell':
|
||||
print_version()
|
||||
if ".dev" in odrive.__version__:
|
||||
print("")
|
||||
logger.warn("Developer Preview")
|
||||
print(" If you find issues, please report them")
|
||||
print(" on https://github.com/madcowswe/ODrive/issues")
|
||||
print(" or better yet, submit a pull request to fix it.")
|
||||
print("")
|
||||
import odrive.shell
|
||||
odrive.shell.launch_shell(args, logger, printer, app_shutdown_token)
|
||||
|
||||
|
||||
+5
-5
@@ -10,7 +10,7 @@ To build and package the python tools into a tar archive:
|
||||
python setup.py sdist
|
||||
|
||||
Warning: Before you proceed, be aware that you can upload a
|
||||
specific version only ever once. After that you need to increment
|
||||
specific version only once ever. After that you need to increment
|
||||
the hotfix number. Deleting the release manually on the PyPi
|
||||
website does not help.
|
||||
|
||||
@@ -19,10 +19,10 @@ Use TestPyPi while developing.
|
||||
To build, package and upload the python tools to TestPyPi, run:
|
||||
python setup.py sdist upload -r pypitest
|
||||
To make a real release ensure you're at the release commit
|
||||
and then run the above command without the "test".
|
||||
and then run the above command without the "test" (so just "pypi").
|
||||
|
||||
To install a prerelease version from test index:
|
||||
sudo pip install --index-url https://test.pypi.org/simple/ --no-cache-dir odrive
|
||||
sudo pip install --pre --index-url https://test.pypi.org/simple/ --no-cache-dir odrive
|
||||
|
||||
|
||||
PyPi access requires that you have set up ~/.pypirc with your
|
||||
@@ -32,7 +32,7 @@ to publish packages with the name odrive.
|
||||
|
||||
# TODO: add additional y/n prompt to prevent from erroneous upload
|
||||
|
||||
from distutils.core import setup
|
||||
from setuptools import setup
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -77,6 +77,7 @@ setup(
|
||||
url = 'https://github.com/madcowswe/ODrive',
|
||||
keywords = ['odrive', 'motor', 'motor control'],
|
||||
install_requires = [
|
||||
'ipython', # Used to do the interactive parts of the odrivetool
|
||||
'PyUSB', # Required to access USB devices from Python through libusb
|
||||
'PySerial', # Required to access serial devices from Python
|
||||
'IntelHex', # Used to by DFU to load firmware files
|
||||
@@ -84,7 +85,6 @@ setup(
|
||||
'pywin32==222;platform_system=="Windows"' # Required for fancy terminal features on Windows
|
||||
],
|
||||
package_data={'': ['version.txt']},
|
||||
include_package_data=True,
|
||||
classifiers = [],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user