~facundo/enjuewemela/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env python

"""setup -- setuptools setup file for Enjuewemela."""

__author__ = "Facundo Batista"
__author_email__ = "facundo en taniquetil punto com punto ar"
__version__ = "0.1"
__date__ = "2010-04-08"

import glob
import os

from distutils.core import setup

__description__ = """
Crazy game with a lot of gems that tend to dissappear strangely
following user actions.
"""

def recursive(base, dirs):
    all_files = []
    for d in dirs:
        for basedir, dirnames, filenames in os.walk(os.path.join(base, d)):
#            all_files.extend(os.path.join(basedir, x) for x in dirnames)
            all_files.extend(os.path.join(basedir, x) for x in filenames)

    # remove the base dir
    lenbase = len(base) + 1
    return [x[lenbase:] for x in all_files]

def get_sub_packages(basedir):
    all_packages = []
    for directory, dirnames, filenames in os.walk(basedir):
        if "__init__.py" in filenames:
            packpath = directory.replace("/", ".")
            all_packages.append(packpath)
    return all_packages

setup(
    name = 'enjuewemela',
    version = __version__,
    author = __author__,
    author_email = __author_email__,
    description = __description__,
    url = 'https://launchpad.net/enjuewemela/',

    packages = ['enjuewemela', 'enjuewemela.cocos'] +
                get_sub_packages("enjuewemela/cocos/cocos"),

    package_data = {
        'enjuewemela': recursive('enjuewemela',
                   ['audio', 'fonts', 'images', 'jewels', 'locale', 'tests']),
        'enjuewemela.cocos': ['README'] + glob.glob('LICENSE*'),
        'enjuewemela.cocos.cocos': ['resources/*'],
    },
    )