Ticket #2989: setup.py.diff

File setup.py.diff, 921 bytes (added by __doc__, 18 years ago)

propsed setup.py fix

  • setup.py

     
    1111# Compile the list of packages available, because distutils doesn't have
    1212# an easy way to do this.
    1313packages, data_files = [], []
     14package_dir = os.path.dirname(__file__)
    1415root_dir = os.path.join(os.path.dirname(__file__), 'django')
    1516for dirpath, dirnames, filenames in os.walk(root_dir):
    1617    # Ignore dirnames that start with '.'
    1718    for i, dirname in enumerate(dirnames):
    1819        if dirname.startswith('.'): del dirnames[i]
    1920    if '__init__.py' in filenames:
    20         packages.append(dirpath.replace('/', '.'))
     21        package_path = dirpath[len(package_dir):].strip('/')
     22        packages.append(package_path.replace('/', '.'))
    2123    else:
    2224        data_files.append((dirpath, [os.path.join(dirpath, f) for f in filenames]))
Back to Top