~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-21 01:35:01 UTC
  • mfrom: (2733.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070821013501-op6nu6ae9u5gp56v
(Ian Clatworthy) Documentation organized into directories

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
 
208
208
 
209
209
if 'bdist_wininst' in sys.argv:
210
 
    import glob
211
 
    # doc files
212
 
    docs = glob.glob('doc/*.html') + ['doc/default.css']
213
 
    dev_docs = glob.glob('doc/developers/*.html')
 
210
    def find_docs():
 
211
        docs = []
 
212
        for root, dirs, files in os.walk('doc'):
 
213
            r = []
 
214
            for f in files:
 
215
                if os.path.splitext(f)[1] in ('.html', '.css'):
 
216
                    r.append(os.path.join(root, f))
 
217
            if r:
 
218
                relative = root[4:]
 
219
                if relative:
 
220
                    target = os.path.join('Doc\\Bazaar', relative)
 
221
                else:
 
222
                    target = 'Doc\\Bazaar'
 
223
                docs.append((target, r))
 
224
        return docs
 
225
 
214
226
    # python's distutils-based win32 installer
215
227
    ARGS = {'scripts': ['bzr', 'tools/win32/bzr-win32-bdist-postinstall.py'],
216
228
            'ext_modules': ext_modules,
217
229
            # help pages
218
 
            'data_files': [('Doc/Bazaar', docs),
219
 
                           ('Doc/Bazaar/developers', dev_docs),
220
 
                          ],
 
230
            'data_files': find_docs(),
221
231
            # for building pyrex extensions
222
232
            'cmdclass': {'build_ext': build_ext},
223
233
           }