richleland / django-happening

a collection of news and events focused django apps.

Changed (Δ945 bytes):

raw changeset »

setup.py (35 lines added, 0 lines removed)

Up to file-list setup.py:

1
import os
2
from distutils.core import setup
3
4
def fullsplit(path, result=None):
5
    """
6
    Split a pathname into components (the opposite of os.path.join) in a
7
    platform-neutral way.
8
    """
9
    if result is None:
10
        result = []
11
    head, tail = os.path.split(path)
12
    if head == "":
13
        return [tail] + result
14
    if head == path:
15
        return result
16
    return fullsplit(head, [tail] + result)
17
18
package_dir = "basic"
19
20
packages = []
21
for dirpath, dirnames, filenames in os.walk(package_dir):
22
    # ignore dirnames that start with '.'
23
    for i, dirname in enumerate(dirnames):
24
        if dirname.startswith("."):
25
            del dirnames[i]
26
    if "__init__.py" in filenames:
27
        packages.append(".".join(fullsplit(dirpath)))
28
29
30
setup(name='django-happening',
31
    version='0.1',
32
    description='Django Happening',
33
    author='Richard Leland',
34
    url='http://bitbucket.org/nathanborror/django-happening',
35
    packages=packages)