3 from distutils.core import setup
7 # Shamelessly cribbed from django's setup.py file.
8 def fullsplit(path, result=None):
10 Split a pathname into components (the opposite of os.path.join) in a
15 head, tail = os.path.split(path)
17 return [tail] + result
20 return fullsplit(head, [tail] + result)
22 # Compile the list of packages available, because distutils doesn't have
23 # an easy way to do this. Shamelessly cribbed from django's setup.py file.
24 packages, data_files = [], []
25 root_dir = os.path.dirname(__file__)
30 for dirpath, dirnames, filenames in os.walk(philo_dir):
31 # Ignore dirnames that start with '.'
32 for i, dirname in enumerate(dirnames):
33 if dirname.startswith('.'): del dirnames[i]
34 if '__init__.py' in filenames:
35 packages.append('.'.join(fullsplit(dirpath)))
37 data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
40 version = __import__('philo').VERSION
44 version = '%s.%s' % (version[0], version[1]),
46 data_files = data_files,