From d2ea5b6df2b50c9abde934eb869f2251debedc64 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Sat, 7 Jan 2017 20:48:01 -0500 Subject: [PATCH] setup.py, rearrange files --- .gitignore | 4 ++++ axi/__init__.py | 8 +++---- axi/device.py | 6 ++++-- axi/paths.py | 2 +- .../butterfly_test.py | 0 device_test.py => examples/device_test.py | 0 drawing_test.py => examples/drawing_test.py | 0 planner_test.py => examples/planner_test.py | 0 setup.py | 21 +++++++++++++++++++ 9 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 .gitignore rename butterfly_test.py => examples/butterfly_test.py (100%) rename device_test.py => examples/device_test.py (100%) rename drawing_test.py => examples/drawing_test.py (100%) rename planner_test.py => examples/planner_test.py (100%) create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2a72572 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/env +*.egg-info +*.pyc + diff --git a/axi/__init__.py b/axi/__init__.py index d4e9813..4c86400 100644 --- a/axi/__init__.py +++ b/axi/__init__.py @@ -1,5 +1,3 @@ -from device import Device - -from drawing import Drawing - -from planner import Planner +from .device import Device +from .drawing import Drawing +from .planner import Planner diff --git a/axi/device.py b/axi/device.py index cc2a149..c0e5b6a 100644 --- a/axi/device.py +++ b/axi/device.py @@ -1,8 +1,10 @@ +import time + from math import modf -from planner import Planner from serial import Serial from serial.tools.list_ports import comports -import time + +from .planner import Planner STEPS_PER_INCH = 2032 STEPS_PER_MM = 80 diff --git a/axi/paths.py b/axi/paths.py index 3c4c865..b27edd1 100644 --- a/axi/paths.py +++ b/axi/paths.py @@ -1,4 +1,4 @@ -from spatial import Index +from .spatial import Index def sort_paths(paths, reversable=True): first = paths[0] diff --git a/butterfly_test.py b/examples/butterfly_test.py similarity index 100% rename from butterfly_test.py rename to examples/butterfly_test.py diff --git a/device_test.py b/examples/device_test.py similarity index 100% rename from device_test.py rename to examples/device_test.py diff --git a/drawing_test.py b/examples/drawing_test.py similarity index 100% rename from drawing_test.py rename to examples/drawing_test.py diff --git a/planner_test.py b/examples/planner_test.py similarity index 100% rename from planner_test.py rename to examples/planner_test.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..4ffd862 --- /dev/null +++ b/setup.py @@ -0,0 +1,21 @@ +from setuptools import setup + +setup( + name='axi', + version='0.1', + description='Library for working with the AxiDraw v3 pen plotter.', + author='Michael Fogleman', + author_email='michael.fogleman@gmail.com', + packages=['axi'], + install_requires=['pyserial'], + license='MIT', + classifiers=( + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + 'Natural Language :: English', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: Implementation :: CPython', + ), +)