import os
from setuptools import find_packages, setup

with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
    README = readme.read()

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

package = 'djaffar'


def get_packages(package):
    """
    Return root package and all sub-packages.
    """
    return [dirpath
            for dirpath, dirnames, filenames in os.walk(package)
            if os.path.exists(os.path.join(dirpath, '__init__.py'))]

def get_package_data(package):
    """
    Return all files under the root package, that are not in a
    package themselves.
    """
    walk = [(dirpath.replace(package + os.sep, '', 1), filenames)
            for dirpath, dirnames, filenames in os.walk(package)
            if not os.path.exists(os.path.join(dirpath, '__init__.py'))]

    filepaths = []
    for base, filenames in walk:
        filepaths.extend([os.path.join(base, filename)
                          for filename in filenames])
    return {package: filepaths}

setup(
    name='django-djaffar',
    version='0.1.6',
    packages=get_packages(package),
    package_data=get_package_data(package),
    include_package_data=True,
    license='BSD License',
    description='An asynchronous user activity tracking API for Django.',
    long_description=README,
    url='https://github.com/arnaudrenaud/django-djaffar',
    download_url='https://github.com/arnaudrenaud/django-djaffar/tarball/0.1.6',
    author='Arnaud Renaud',
    author_email='arnaud.renaud@gmail.com',
    install_requires=[
        'Django>=1.8',
        'djangorestframework>=3',
        'python-dateutil>=2.6',
    ],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Framework :: Django :: 1.8',
        'Framework :: Django :: 1.9',
        'Framework :: Django :: 1.10',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Natural Language :: English',
        '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',
        'Topic :: Internet :: WWW/HTTP',
    ],
    test_suite="runtests.runtests",
)

@@ -1119,25 +1119,25 @@
 ersion='0.1.
-6
+7
 ',%0A    packa
@@ -1503,17 +1503,17 @@
 all/0.1.
-6
+7
 ',%0A    a

Bump version