Skip to content

Commit

Permalink
Merge pull request #20 from iheartradio/packaging
Browse files Browse the repository at this point in the history
Release-readiness cleanup
  • Loading branch information
dirn committed Mar 2, 2016
2 parents 9c27ce4 + 7139453 commit 9731106
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 6 deletions.
9 changes: 9 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
=======
Authors
=======

The following folks have contributed to making this library possible.

* Andy Dirnberger (`@dirn <https://github.com/dirn>`_)
* Jon Banafato (`@jonafato <https://github.com/jonafato>`_)
* Leonard Bedner (`@lbedner <https://github.com/lbedner>`_)
12 changes: 12 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
include AUTHORS.rst
include LICENSE
include README.rst

recursive-include docs Makefile *.py *.rst

exclude .coveragerc
exclude .travis.yml
exclude tox.ini

prune docs/_build
prune tests
14 changes: 11 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
##############
Henson-Logging
##############
#############################
Henson-Logging |build status|
#############################

.. |build status| image:: https://travis-ci.org/iheartradio/Henson-Logging.svg?branch=master
:target: https://travis-ci.org/iheartradio/Henso-Logging

A library to use structured logging with a Henson application.

* `Documentation <https://henson-logging.rtfd.org>`_
* `Installation <https://henson-logging.readthedocs.org/en/latest/#installation>`_
* `Changelog <https://henson-logging.readthedocs.org/en/latest/changes.html>`_
* `Source <https://github.com/iheartradio/Henson-logging>`_
15 changes: 13 additions & 2 deletions henson_logging/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
"""Logging plugin for Henson."""

from pkg_resources import get_distribution
import logging
import logging.config
import os
import pkg_resources

from henson import Extension
import structlog

from . import processors

__all__ = ('Logging',)
__version__ = get_distribution(__package__).version

try:
_dist = pkg_resources.get_distribution(__package__)
if not __file__.startswith(os.path.join(_dist.location, __package__)):
# Manually raise the exception if there is a distribution but
# it's installed from elsewhere.
raise pkg_resources.DistributionNotFound
except pkg_resources.DistributionNotFound:
__version__ = 'development'
else:
__version__ = _dist.version


class Logging(Extension):
Expand Down
31 changes: 30 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,45 @@
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
import sys


class PyTest(TestCommand):
def finalize_options(self):
super().finalize_options()
self.test_args = []
self.test_suite = True

def run_tests(self):
import pytest
sys.exit(pytest.main(self.test_args))


def read(filename):
with open(filename) as f:
return f.read()


setup(
name='Henson-Logging',
version='0.3.0',
author='Andy Dirnberger, Jon Banafato, and others',
author_email='[email protected]',
url='https://henson-logging.rtfd.org',
description='A library to use structured logging with a Henson application.',
long_description=read('README.rst'),
license='Apache License, Version 2.0',
packages=find_packages(exclude=['tests']),
zip_safe=False,
install_requires=[
'Henson>=0.2.0',
'structlog',
],
tests_require=[
'tox',
'pytest',
],
cmdclass={
'test': PyTest,
},
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand Down

0 comments on commit 9731106

Please sign in to comment.