~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Ian Clatworthy
  • Date: 2007-08-20 23:43:41 UTC
  • mfrom: (2691.1.19 doc.ian)
  • mto: This revision was merged to the branch mainline in revision 2734.
  • Revision ID: ian.clatworthy@internode.on.net-20070820234341-fza0lrqitiyybior
(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
           }