[MERGE][0.90] Doc organised into directories

Alexander Belchenko bialix at ukr.net
Tue Aug 14 07:22:18 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bb:tweak

You missed python installer for windows. It also should be aware of new documentation layout.

=== modified file 'setup.py'
- --- setup.py	2007-08-02 10:28:36 +0000
+++ setup.py	2007-08-14 06:19:19 +0000
@@ -207,17 +207,29 @@


 if 'bdist_wininst' in sys.argv:
- -    import glob
- -    # doc files
- -    docs = glob.glob('doc/*.html') + ['doc/default.css']
- -    dev_docs = glob.glob('doc/developers/*.html')
+    def find_docs():
+        import fnmatch
+        docs = []
+        for root, dirs, files in os.walk('doc'):
+            r = []
+            for f in files:
+                if (fnmatch.fnmatch(f, '*.html') or
+                    fnmatch.fnmatch(f, '*.css')):
+                    r.append(os.path.join(root, f))
+            if r:
+                relative = root[4:]
+                if relative:
+                    target = os.path.join('Doc\\Bazaar', relative)
+                else:
+                    target = 'Doc\\Bazaar'
+                docs.append((target, r))
+        return docs
+
     # python's distutils-based win32 installer
     ARGS = {'scripts': ['bzr', 'tools/win32/bzr-win32-bdist-postinstall.py'],
             'ext_modules': ext_modules,
             # help pages
- -            'data_files': [('Doc/Bazaar', docs),
- -                           ('Doc/Bazaar/developers', dev_docs),
- -                          ],
+            'data_files': find_docs(),
             # for building pyrex extensions
             'cmdclass': {'build_ext': build_ext},
            }




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGwUoazYr338mxwCURApCDAJ4xJDzWl/Xd6xCORejXxWZqAIGQPwCfbV5O
Faz+uAxR/PGD2eqUl52+UR8=
=nlHM
-----END PGP SIGNATURE-----



More information about the bazaar mailing list