Skip to content

Instantly share code, notes, and snippets.

@AndrewIngram
Created February 1, 2010 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewIngram/291716 to your computer and use it in GitHub Desktop.
Save AndrewIngram/291716 to your computer and use it in GitHub Desktop.
from distutils.core import setup
import os
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir:
os.chdir(root_dir)
for dirpath, dirnames, filenames in os.walk('polymorphic'):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'): del dirnames[i]
if '__init__.py' in filenames:
pkg = dirpath.replace(os.path.sep, '.')
if os.path.altsep:
pkg = pkg.replace(os.path.altsep, '.')
packages.append(pkg)
setup(
name = 'polymorphic',
version = '0.1',
description = 'Django Polymorphic',
author = 'Bert Constantin',
author_email = 'someone@example.org',
url = 'http://bserve.webhop.org/wiki/django_polymorphic',
package_dir = {'polymorphic': 'polymorphic'},
packages = packages,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment