Created
February 1, 2010 14:43
-
-
Save AndrewIngram/291716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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