Created
September 21, 2009 19:40
-
-
Save wnielson/190497 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from setuptools import setup, find_packages | |
import os | |
# Based off of Django's setup.py | |
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) | |
# 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) | |
schedule_dir = 'schedule' | |
for dirpath, dirnames, filenames in os.walk(schedule_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))) | |
elif filenames: | |
data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]]) | |
setup( | |
name='django-schedule', | |
version='0.5b', | |
description='A calendaring app for Django.', | |
author='Anthony Robert Hauber', | |
author_email='thauber@gmail.com', | |
url='http://github.com/thauber/django-schedule/tree/master', | |
packages = packages, | |
data_files = data_files, | |
include_package_data=True, | |
zip_safe=False, | |
classifiers=['Development Status :: 4 - Beta', | |
'Environment :: Web Environment', | |
'Framework :: Django', | |
'Intended Audience :: Developers', | |
'License :: OSI Approved :: BSD License', | |
'Operating System :: OS Independent', | |
'Programming Language :: Python', | |
'Topic :: Utilities'], | |
install_requires=['setuptools', 'vobject'], | |
license='BSD', | |
test_suite = "schedule.tests", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment