import os
import sys
from setuptools import setup

if sys.version_info < (3, 2):
    print("Sorry, django-system-maintenance currently requires Python 3.2+.")
    sys.exit(1)

# From: https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
def read(*paths):
    """Build a file path from *paths* and return the contents."""
    with open(os.path.join(*paths), 'r') as f:
        return f.read()

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

install_requires = [
    "Django>=1.7",    # Confirmed good through 1.11.16
    "django-markupfield>=1.3.5",    # Confirmed good through 1.5.0
    "docutils>=0.12",    # Confirmed good through 0.14
    "markdown2>=2.3.0",    # Confirmed good through 2.3.6
    "Pygments>=2.0.2",    # Confirmed good through 2.2.0
]

setup(
    name='django-system-maintenance',
    version='0.3.1',
    packages=['system_maintenance'],
    include_package_data=True,
    license='BSD License',
    keywords='sysadmin system administration documentation maintenance',
    description='A Django app to document and track the administration and maintenance of computer systems',
    long_description=(read('README.rst') + '\n\n' +
                      read('CHANGELOG.rst')),
    url='https://github.com/mfcovington/django-system-maintenance',
    author='Michael F. Covington',
    author_email='mfcovington@gmail.com',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Framework :: Django :: 1.7',
        'Framework :: Django :: 1.8',
        'Framework :: Django :: 1.9',
        'Framework :: Django :: 1.10',
        'Framework :: Django :: 1.11',
        'Intended Audience :: Developers',
        'Intended Audience :: Information Technology',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3 :: Only',
        'Topic :: Documentation',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: System :: Systems Administration',
    ],
    install_requires=install_requires,
)

import os
import sys
from setuptools import setup

if sys.version_info < (3, 4):
    print("Sorry, django-system-maintenance currently requires Python 3.4+.")
    sys.exit(1)

# From: https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
def read(*paths):
    """Build a file path from *paths* and return the contents."""
    with open(os.path.join(*paths), 'r') as f:
        return f.read()

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

install_requires = [
    "Django>=2.0",    # Confirmed good through 2.0.9
    "django-markupfield>=1.3.5",    # Confirmed good through 1.5.0
    "docutils>=0.12",    # Confirmed good through 0.14
    "markdown2>=2.3.0",    # Confirmed good through 2.3.6
    "Pygments>=2.0.2",    # Confirmed good through 2.2.0
]

setup(
    name='django-system-maintenance',
    version='0.3.1',
    packages=['system_maintenance'],
    include_package_data=True,
    license='BSD License',
    keywords='sysadmin system administration documentation maintenance',
    description='A Django app to document and track the administration and maintenance of computer systems',
    long_description=(read('README.rst') + '\n\n' +
                      read('CHANGELOG.rst')),
    url='https://github.com/mfcovington/django-system-maintenance',
    author='Michael F. Covington',
    author_email='mfcovington@gmail.com',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Framework :: Django :: 2.0',
        'Intended Audience :: Developers',
        'Intended Audience :: Information Technology',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3 :: Only',
        'Topic :: Documentation',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: System :: Systems Administration',
    ],
    install_requires=install_requires,
)

Update dependency version requirements (Python>=3.4; Django>=2.0,<=2.0.9)