From 46bfbcf188fa31bea2c08c14df696e136d4983e3 Mon Sep 17 00:00:00 2001 From: Stephen Burrows Date: Fri, 7 Oct 2011 18:54:14 -0700 Subject: [PATCH] Tweaked manifest file. Removed a bunch of hackery from setup.py in favor of setuptools.find_packages, since we're using setuptools anyway. Addresses bug #177. --- MANIFEST.in | 10 ++++++---- setup.py | 40 ++++------------------------------------ 2 files changed, 10 insertions(+), 40 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index bb9b2ed..0e076d9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,9 +2,11 @@ include README include README.markdown include LICENSE include MANIFEST.in -recursive-include docs * recursive-include philo/templates *.html -recursive-include philo/static * +recursive-include philo/contrib/sobol/templates *.html recursive-include philo/fixtures *.json -recursive-include philo/contrib/sobol/static * -recursive-include philo/contrib/sobol/templates *.html \ No newline at end of file +recursive-include philo/static *.css *.js +recursive-include philo/contrib/sobol/static *.css *.js +recursive-include docs *.py *.rst *.bat *.txt Makefile +global-exclude *~ +prune docs/_build \ No newline at end of file diff --git a/setup.py b/setup.py index d3fa76b..82ba104 100644 --- a/setup.py +++ b/setup.py @@ -1,54 +1,22 @@ #!/usr/bin/env python -from setuptools import setup import os - -# Shamelessly cribbed from django's setup.py file. -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. Shamelessly cribbed from django's setup.py file. -packages, data_files = [], [] -root_dir = os.path.dirname(__file__) -if root_dir != '': - os.chdir(root_dir) -philo_dir = 'philo' - -for dirpath, dirnames, filenames in os.walk(philo_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]]) +from setuptools import setup, find_packages version = __import__('philo').VERSION + setup( name = 'philo', version = '.'.join([str(v) for v in version]), url = "http://philocms.org/", description = "A foundation for developing web content management systems.", - long_description = open(os.path.join(root_dir, 'README')).read(), + long_description = open(os.path.join(os.path.dirname(__file__), 'README')).read(), maintainer = "iThink Software", maintainer_email = "contact@ithinksw.com", - packages = packages, - data_files = data_files, + packages = find_packages(), classifiers = [ 'Environment :: Web Environment', -- 2.20.1