Skip to content

Instantly share code, notes, and snippets.

@dbarnett
Created May 7, 2010 16:01
Show Gist options
  • Save dbarnett/393629 to your computer and use it in GitHub Desktop.
Save dbarnett/393629 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import glob
import os
import setuptools
import sys
import types
def show_all_files(*args, **kw):
# package files
for pkg in setuptools.find_packages():
pkg_dir = pkg.replace('.', os.path.sep)
for fname in glob.glob(os.path.join(pkg_dir, '*.py')):
print fname
# scripts
if 'scripts' in kw:
for fname in kw['scripts']:
print fname
# data_files
if 'data_files' in kw:
file_lists = dict(kw['data_files']).values()
for fnames in file_lists:
if isinstance(fnames, types.StringTypes):
print fnames
else:
for fname in fnames:
print fname
setuptools.setup = show_all_files
import setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment