read()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
1
# coding=utf-8
2
import sys
3
from setuptools import setup, find_packages
4
5
NAME = 'django-roughpages'
6
VERSION = '1.0.0'
7
8
9
def read(filename):
10
    import os
11
    BASE_DIR = os.path.dirname(__file__)
12
    filename = os.path.join(BASE_DIR, filename)
13
    with open(filename, 'r') as fi:
14
        return fi.read()
15
16
17
def readlist(filename):
18
    rows = read(filename).split("\n")
19
    rows = [x.strip() for x in rows if x.strip()]
20
    return list(rows)
21
22
# if we are running on python 3, enable 2to3 and
23
# let it use the custom fixers from the custom_fixers
24
# package.
25
extra = {}
26
if sys.version_info >= (3, 0):
27
    extra.update(
28
        use_2to3=True,
29
    )
30
31
setup(
32
    name=NAME,
33
    version=VERSION,
34
    description=('An template based flatpage like app of Django.'),
35
    long_description=read('README.rst'),
36
    classifiers=(
37
        'Development Status :: 5 - Production/Stable',
38
        'Environment :: Web Environment',
39
        'Framework :: Django',
40
        'Intended Audience :: Developers',
41
        'License :: OSI Approved :: MIT License',
42
        'Programming Language :: Python',
43
        'Programming Language :: Python :: 2',
44
        'Programming Language :: Python :: 2.7',
45
        'Programming Language :: Python :: 3',
46
        'Programming Language :: Python :: 3.3',
47
        'Programming Language :: Python :: 3.4',
48
        'Programming Language :: Python :: 3.5',
49
        'Topic :: Internet :: WWW/HTTP',
50
        'Topic :: Software Development :: Libraries',
51
        'Topic :: Software Development :: Libraries :: Application Frameworks',
52
        'Topic :: Software Development :: Libraries :: Python Modules',
53
    ),
54
    keywords='django flatpage template',
55
    author='Alisue',
56
    author_email='[email protected]',
57
    url='https://github.com/lambdalisue/%s' % NAME,
58
    download_url='https://github.com/lambdalisue/%s/tarball/master' % NAME,
59
    license='MIT',
60
    packages=find_packages('src'),
61
    package_dir={'': 'src'},
62
    include_package_data=True,
63
    package_data={
64
        '': ['README.rst',
65
             'requirements.txt',
66
             'requirements-test.txt',
67
             'requirements-docs.txt'],
68
    },
69
    zip_safe=True,
70
    install_requires=readlist('requirements.txt'),
71
    test_suite='runtests.run_tests',
72
    tests_require=readlist('requirements-test.txt'),
73
    **extra
74
)
75