prep for initial release

This commit is contained in:
Peter Boin 2017-07-18 18:49:32 +10:00
parent 63744fee40
commit a59c41a282
3 changed files with 45 additions and 33 deletions

View File

@ -2,5 +2,5 @@
universal = 1
[metadata]
description-file = README.md
description-file = README.rst
license_file = LICENSE

View File

@ -5,30 +5,30 @@ import re
from setuptools import setup, find_packages
# Setup template thanks to: Hynek Schlawack
# https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
###################################################################
NAME = "attrs"
NAME = "pygcode"
PACKAGES = find_packages(where="src")
META_PATH = os.path.join("src", "attr", "__init__.py")
KEYWORDS = ["class", "attribute", "boilerplate"]
META_PATH = os.path.join("src", NAME, "__init__.py")
KEYWORDS = ['gcode', 'cnc', 'parser', 'interpreter']
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Development Status :: 2 - Pre-Alpha", # see src/pygcode/__init__.py
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering",
]
INSTALL_REQUIRES = [
'euclid3', # 2D and 3D vector, matrix, quaternion and geometry module.
'six', # Python 2 and 3 compatibility utilities
]
INSTALL_REQUIRES = []
###################################################################
@ -52,7 +52,7 @@ def find_meta(meta):
Extract __*meta*__ from META_FILE.
"""
meta_match = re.search(
r"^(?P<name>__{meta}__)\s*=\s*['\"](?P<value>[^'\"]*)['\"]".format(meta=meta),
r"^(?P<name>__{meta}__)\s*=\s*['\"](?P<value>[^'\"]*)['\"](\s*#.*)?$".format(meta=meta),
META_FILE, re.M
)
if meta_match:
@ -65,7 +65,7 @@ if __name__ == "__main__":
name=NAME,
description=find_meta("description"),
license=find_meta("license"),
url=find_meta("uri"),
url=find_meta("url"),
version=find_meta("version"),
author=find_meta("author"),
author_email=find_meta("email"),
@ -79,18 +79,3 @@ if __name__ == "__main__":
classifiers=CLASSIFIERS,
install_requires=INSTALL_REQUIRES,
)
#VERSION = '0.1.dev' # *.dev = release candidate
#
#setup(
# name = 'pygcode',
# packages = ['pygcode'],
# version = VERSION,
# description = 'basic g-code parser, interpreter, and writer library',
# author = 'Peter Boin',
# author_email = 'peter.boin@gmail.com',
# url = 'https://github.com/fragmuffin/pygcode',
# download_url = 'https://github.com/fragmuffin/pygcode/archive/%s.tar.gz' % VERSION,
# keywords = ['gcode', 'cnc', 'parser', 'interpreter'],
# classifiers = [],
#)

View File

@ -1,3 +1,27 @@
# =========================== Package Information ===========================
# Version Planning:
# 0.1.x - Development Status :: 2 - Pre-Alpha
# 0.2.x - Development Status :: 3 - Alpha
# 0.3.x - Development Status :: 4 - Beta
# 1.x - Development Status :: 5 - Production/Stable
# <any above>.y - developments on that version (pre-release)
# <any above>*.dev - development release (intended purely to test deployment)
__version__ = "0.1.0.dev"
__title__ = "pygcode"
__description__ = "Basic g-code parser, interpreter, and encoder library."
__url__ = "https://github.com/fragmuffin/pygcode"
__author__ = "Peter Boin"
__email__ = "peter.boin@gmail.com"
__license__ = "GPLv3"
# not text-parsable
__copyright__ = "Copyright (c) 2017 {0}".format(__author__)
# =========================== Imports ===========================
__all__ = [
# Machine
'Machine', 'Position', 'CoordinateSystem', 'State', 'Mode',
@ -12,7 +36,7 @@ __all__ = [
# GCodes
'words2gcodes', 'text2gcodes', 'split_gcodes',
# $ python -c "from pygcode.gcodes import GCode, _subclasses as sc; print(',\\n '.join(sorted('\\'%s\\'' % g.__name__ for g in sc(GCode))))"python -c "from pygcode.gcodes import GCode, _subclasses as sc; print(',\\n '.join(sorted('\\'%s\\'' % g.__name__ for g in sc(GCode))))"
# $ python -c "from pygcode.gcodes import GCode, _subclasses as sc; print(',\\n '.join(sorted('\\'%s\\'' % g.__name__ for g in sc(GCode))))"
'GCode',
'GCodeAbsoluteArcDistanceMode',
'GCodeAbsoluteDistanceMode',
@ -30,6 +54,7 @@ __all__ = [
'GCodeCancelToolLengthOffset',
'GCodeCannedCycle',
'GCodeCannedCycleReturnLevel',
'GCodeCannedCycleReturnToR',
'GCodeCannedReturnMode',
'GCodeCoolant',
'GCodeCoolantFloodOn',
@ -174,7 +199,8 @@ from .gcodes import (
# G83 - GCodeDrillingCyclePeck: G83: Drilling Cycle, Peck
# G76 - GCodeThreadingCycle: G76: Threading Cycle
# - GCodeCannedReturnMode:
# G98 - GCodeCannedCycleReturnLevel: G98: Canned Cycle Return Level
# G98 - GCodeCannedCycleReturnLevel: G98: Canned Cycle Return to the level set prior to cycle start
# G99 - GCodeCannedCycleReturnToR: G99: Canned Cycle Return to the level set by R
# - GCodeCoolant:
# M08 - GCodeCoolantFloodOn: M8: turn flood coolant on
# M07 - GCodeCoolantMistOn: M7: turn mist coolant on
@ -305,6 +331,7 @@ from .gcodes import (
GCodeCancelToolLengthOffset,
GCodeCannedCycle,
GCodeCannedCycleReturnLevel,
GCodeCannedCycleReturnToR,
GCodeCannedReturnMode,
GCodeCoolant,
GCodeCoolantFloodOn,