1. Ian George
  2. Quiet apps

Source

Quiet apps / setup.py

import os
from distutils.core import setup

#taken from Nathan Borror's basic apps setup.py file (https://github.com/nathanborror/django-basic-apps/)

def fullsplit(path, result=None):
    """
    Split a pathname into components (the opposite of os.path.join) in a
    platform-neutral way.
    """
    if result is None:
        result = []
    head, tail = os.path.split(path)
    if head == "":
        return [tail] + result
    if head == path:
        return result
    return fullsplit(head, [tail] + result)


package_dir = "quiet"


packages = []
for dirpath, dirnames, filenames in os.walk(package_dir):
    # ignore dirnames that start with '.'
    for i, dirname in enumerate(dirnames):
        if dirname.startswith("."):
            del dirnames[i]
    if "__init__.py" in filenames:
        packages.append(".".join(fullsplit(dirpath)))


setup(name='quiet-apps',
      version='0.1.1',
      description='Quiet Apps',
      author='Ian George',
      url='https://bitbucket.org/elbeanio/quiet-apps',
      packages=packages)