set up reclass for packaging on pypi
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..1c1accc
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,12 @@
+# Include the license and changelog
+include LICENSE ChangeLog.rst
+# Exclude development tooling
+exclude Makefile requirements.txt .pylintrc reclass.py
+# Exclude testing infra
+exclude run_tests.py
+prune reclass/datatypes/tests
+prune reclass/storage/tests
+prune reclass/utils/tests
+# Exclude "source only" content
+prune doc
+prune examples
diff --git a/reclass/version.py b/reclass/version.py
index 64923eb..a2aa99a 100644
--- a/reclass/version.py
+++ b/reclass/version.py
@@ -11,6 +11,8 @@
VERSION = '1.4.1'
AUTHOR = 'martin f. krafft'
AUTHOR_EMAIL = 'reclass@pobox.madduck.net'
+MAINTAINER = 'Jason Ritzke (@Rtzq0)'
+MAINTAINER_EMAIL = 'jasonritzke@4loopz.com'
COPYRIGHT = 'Copyright © 2007–14 ' + AUTHOR
LICENCE = 'Artistic Licence 2.0'
URL = 'https://github.com/madduck/reclass'
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..c3726e8
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+pyyaml
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..d645be7
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,5 @@
+[bdist_wheel]
+# This flag says that the code is written to work on both Python 2 and Python
+# 3. If at all possible, it is good practice to do this. If you cannot, you
+# will need to generate wheels for each Python version that you support.
+universal=0
diff --git a/setup.py b/setup.py
index c0fd5d8..3830b84 100644
--- a/setup.py
+++ b/setup.py
@@ -10,6 +10,16 @@
from reclass.version import *
from setuptools import setup, find_packages
+# use consistent encoding of readme for pypi
+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()
+
ADAPTERS = ['salt', 'ansible']
console_scripts = ['reclass = reclass.cli:main']
console_scripts.extend('reclass-{0} = reclass.adapters.{0}:cli'.format(i)
@@ -18,12 +28,25 @@
setup(
name = RECLASS_NAME,
description = DESCRIPTION,
+ long_description=long_description,
version = VERSION,
author = AUTHOR,
author_email = AUTHOR_EMAIL,
+ maintainer = MAINTAINER,
+ maintainer_email = MAINTAINER_EMAIL,
license = LICENCE,
url = URL,
- packages = find_packages(),
+ packages = find_packages(exclude=['*tests']), #FIXME validate this
entry_points = { 'console_scripts': console_scripts },
- install_requires = ['pyyaml']
+ install_requires = ['pyyaml'],
+
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Intended Audience :: System Administrators',
+ 'Topic :: System :: Systems Administration',
+ 'License :: OSI Approved :: Artistic License',
+ 'Programming Language :: Python :: 2.7',
+ ],
+
+ keywords='enc ansible salt'
)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..ff5b77e
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,38 @@
+# this file is *not* meant to cover or endorse the use of tox or pytest or
+# testing in general,
+#
+# It's meant to show the use of:
+#
+# - check-manifest
+# confirm items checked into vcs are in your sdist
+# - python setup.py check (using the readme_renderer extension)
+# confirms your long_description will render correctly on pypi
+#
+# and also to help confirm pull requests to this project.
+
+[tox]
+envlist = py{27}
+
+[testenv]
+basepython =
+ py27: python2.7
+whitelist_externals=
+ make
+deps =
+ check-manifest
+ {py27}: readme_renderer
+ # flake8 out of the picture right now
+ pytest
+ mock
+ pylint
+ nose
+commands =
+ check-manifest --ignore tox.ini,tests*
+ {py27}: python setup.py check -m -r -s
+ # flake8 . # FIXME: This code smell check goes poorly for us at present
+ make tests
+ # make lint-errors # FIXME: Cause these to operate properly inside tox
+ # make coverage
+[flake8]
+exclude = .tox,*.egg,build,data
+select = E,W,F