setup.py 1.92 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 McKinsey Academy
#
# Authors:
#          Jonathan Piacenti <jonathan@opencraft.com>
#
# This software's license gives you freedom; you can copy, convey,
# propagate, redistribute and/or modify this program under the terms of
# the GNU Affero General Public License (AGPL) as published by the Free
# Software Foundation (FSF), either version 3 of the License, or (at your
# option) any later version of the AGPL published by the FSF.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero
# General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program in a file in the toplevel directory called
# "AGPLv3".  If not, see <http://www.gnu.org/licenses/>.
#
Jonathan Piacenti committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
"""Setup for poll XBlock."""

import os
from setuptools import setup


def package_data(pkg, roots):
    """Generic function to find package_data.

    All of the files under each of the `roots` will be declared as package
    data for package `pkg`.

    """
    data = []
    for root in roots:
        for dirname, _, files in os.walk(os.path.join(pkg, root)):
            for fname in files:
                data.append(os.path.relpath(os.path.join(dirname, fname), pkg))

    return {pkg: data}


setup(
46
    name='xblock-poll',
murad committed
47
    version='1.3.3',
48
    description='An XBlock for polling users.',
Jonathan Piacenti committed
49 50 51 52
    packages=[
        'poll',
    ],
    install_requires=[
53
        'markdown',
54 55
        'ddt',
        'mock',
Jonathan Piacenti committed
56
    ],
57
    dependency_links=['http://github.com/edx/xblock-utils/tarball/master#egg=xblock-utils'],
Jonathan Piacenti committed
58 59 60
    entry_points={
        'xblock.v1': [
            'poll = poll:PollBlock',
61
            'survey = poll:SurveyBlock',
Jonathan Piacenti committed
62 63
        ]
    },
64
    package_data=package_data("poll", ["static", "public", "translations"]),
65
)