setup.py 1.24 KB
Newer Older
1 2
#!/usr/bin/env python

3
import io
4
import os
5 6
from setuptools import setup

7

8 9 10 11
try:
    import pypandoc
    description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
12
    description = io.open('README.md', encoding='utf-8').read()
13

14 15 16 17 18 19 20 21 22 23

def get_packages(package):
    return [dirpath
            for dirpath, dirnames, filenames in os.walk(package)
            if os.path.exists(os.path.join(dirpath, '__init__.py'))]


def get_requirements(file_name):
    return [i.strip() for i in open(file_name).readlines()]

24 25 26

setup(
    name='djoser',
27
    version='0.5.2',
28
    packages=get_packages('djoser'),
29 30 31 32 33
    license='MIT',
    author='SUNSCRAPERS',
    description='REST version of Django authentication system.',
    author_email='info@sunscrapers.com',
    long_description=description,
34
    install_requires=get_requirements('requirements.txt'),
35 36 37 38 39 40 41 42 43 44 45 46
    include_package_data=True,
    url='https://github.com/sunscrapers/djoser',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
    ]
)