setup.py 2.71 KB
Newer Older
Valentin Samir's avatar
Valentin Samir committed
1
import os
2
import pkg_resources
Valentin Samir's avatar
Valentin Samir committed
3 4 5 6 7 8 9 10
from setuptools import 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)))

11 12 13 14 15 16 17 18 19 20 21 22

# if we have Django 1.8 available, use last version of django-boostrap3
try:
    pkg_resources.require('Django >= 1.8')
    django_bootstrap3 = 'django-bootstrap3 >= 5.4'
    django = 'Django >= 1.8,<1.10'
except pkg_resources.VersionConflict:
    # Else if we have django 1.7, we need django-boostrap3 < 7.0.0
    try:
        pkg_resources.require('Django >= 1.7')
        django_bootstrap3 = 'django-bootstrap3 >= 5.4,<7.0.0'
        django = 'Django >= 1.7,<1.8'
23
    except (pkg_resources.VersionConflict, pkg_resources.DistributionNotFound):
24 25 26
        # Else we need to install Django, assume version will be >= 1.8
        django_bootstrap3 = 'django-bootstrap3 >= 5.4'
        django = 'Django >= 1.8,<1.10'
27 28 29 30
# No version of django installed, assume version will be >= 1.8
except pkg_resources.DistributionNotFound:
    django_bootstrap3 = 'django-bootstrap3 >= 5.4'
    django = 'Django >= 1.8,<1.10'
31

Valentin Samir's avatar
Valentin Samir committed
32 33
setup(
    name='django-cas-server',
Valentin Samir's avatar
Valentin Samir committed
34
    version='0.4.3',
35 36 37 38
    packages=[
        'cas_server', 'cas_server.migrations',
        'cas_server.management', 'cas_server.management.commands'
    ],
Valentin Samir's avatar
Valentin Samir committed
39 40
    include_package_data=True,
    license='GPLv3',
41 42
    description=(
        'A Django Central Authentication Service server '
Valentin Samir's avatar
Valentin Samir committed
43
        'implementing the CAS Protocol 3.0 Specification'
44
    ),
Valentin Samir's avatar
Valentin Samir committed
45 46 47 48 49 50 51 52 53 54 55
    long_description=README,
    author='Valentin Samir',
    author_email='valentin.samir@crans.org',
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
56
        'Programming Language :: Python :: 3',
Valentin Samir's avatar
Valentin Samir committed
57 58 59
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    ],
60 61 62 63 64 65 66 67
    package_data={
        'cas_server': [
            'templates/cas_server/*',
            'static/cas_server/*',
            'locale/*/LC_MESSAGES/*',
        ]
    },
    keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'],
68
    install_requires=[
69 70
        django, 'requests >= 2.4', 'requests_futures >= 0.9.5',
        'django-picklefield >= 0.3.1', django_bootstrap3, 'lxml >= 3.4'
71
    ],
72 73 74
    url="https://github.com/nitmir/django-cas-server",
    download_url="https://github.com/nitmir/django-cas-server/releases",
    zip_safe=False
Valentin Samir's avatar
Valentin Samir committed
75
)