From 57f6fa055975b0aa25fcf80c02fd1958f061a7d4 Mon Sep 17 00:00:00 2001 From: Adam Mayer Date: Fri, 8 Dec 2017 21:13:10 -0500 Subject: [PATCH] moving code around for packaging --- LICENSE | 22 ++++++++ apple410.py => apple410/__init__.py | 0 plot_to_svg.py => apple410/plot_to_svg.py | 0 svg_to_plot.py => apple410/svg_to_plot.py | 0 setup.py | 64 +++++++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 LICENSE rename apple410.py => apple410/__init__.py (100%) rename plot_to_svg.py => apple410/plot_to_svg.py (100%) rename svg_to_plot.py => apple410/svg_to_plot.py (100%) create mode 100644 setup.py diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3941739 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2017 Adam Mayer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/apple410.py b/apple410/__init__.py similarity index 100% rename from apple410.py rename to apple410/__init__.py diff --git a/plot_to_svg.py b/apple410/plot_to_svg.py similarity index 100% rename from plot_to_svg.py rename to apple410/plot_to_svg.py diff --git a/svg_to_plot.py b/apple410/svg_to_plot.py similarity index 100% rename from svg_to_plot.py rename to apple410/svg_to_plot.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..33941b5 --- /dev/null +++ b/setup.py @@ -0,0 +1,64 @@ +# Always prefer setuptools over distutils +from setuptools import setup, find_packages +# To use a consistent encoding +from codecs import open +from os import path + + + +here = path.abspath(path.dirname(__file__)) + +# Get the long description from the README file +with open(path.join(here, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + +setup( + name='apple410', + version='0.1.0', + description='A library for controlling the Apple 410 Color Plotter', + long_description=long_description, + + # The project's main homepage. + url='https://github.com/nycresistor/Apple410', + + # Author details + author='Adam Mayer', + author_email='phooky@gmail.com', + + # Choose your license + license='MIT', + + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers + classifiers=[ + 'Development Status :: 3 - Alpha', + + # Indicate who your project is intended for + 'Intended Audience :: Developers', + 'Topic :: Printing', + + # Pick your license as you wish (should match "license" above) + 'License :: OSI Approved :: MIT License', + + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + ], + + keywords='plotter retrocomputing', + + # You can just specify the packages manually here if your project is + # simple. Or you can use find_packages(). + packages=find_packages(exclude=['contrib', 'docs', 'tests']), + install_requires=['serial'], + + python_requires='>=3', + # To provide executable scripts, use entry points in preference to the + # "scripts" keyword. Entry points provide cross-platform support and allow + # pip to create the appropriate form of executable for the target platform. + entry_points={ + 'console_scripts': [ + 'apple410=apple410:main', + ], + }, + )