Revision: 1355
Author: ccanepacc
Date: Fri Mar 21 16:53:48 2014 UTC
Log: making generated docs more discoverable, completed
http://code.google.com/p/los-cocos/source/detail?r=1355
Added:
/trunk/tools/copy_docs.py
Modified:
/trunk/tools/building_release_notes.txt
=======================================
--- /dev/null
+++ /trunk/tools/copy_docs.py Fri Mar 21 16:53:48 2014 UTC
@@ -0,0 +1,37 @@
+"""
+helper for the final release build of cocos
+
+It is meant to be run from a working copy or export of trunk, speifically
+from one of the subdirs tools/ or docgen/
+
+It will copy generated documentation to the harcoded
destination ..\cocos_build
+where the setuptools build is supossed to be generated.
+
+See workflow in tools\building_release_notes.txt
+"""
+from __future__ import division, print_function, unicode_literals
+
+import os
+import shutil
+
+build_dir = "../../cocos_build"
+if not os.path.isdir(build_dir):
+ print("Error, directory %s must exist")
+ sys.exit(1)
+dst = os.path.join(build_dir, "doc/html")
+
+cwd = os.getcwd()
+if os.path.basename(cwd) == 'tools':
+ src = "../docgen/_build/html"
+elif os.path.basename(cwd) == 'docgen':
+ src = "_build/html"
+else:
+ print("This command must be run from the tools/ or docgen/ directory")
+ sys.exit(1)
+
+if os.path.exists(dst):
+ shutil.rmtree(dst)
+
+shutil.copytree(src, dst)
+
+print("*** Done ***")
=======================================
--- /trunk/tools/building_release_notes.txt Fri Mar 21 04:19:47 2014 UTC
+++ /trunk/tools/building_release_notes.txt Fri Mar 21 16:53:48 2014 UTC
@@ -26,16 +26,16 @@
Also, look some random pages in the generated html to see if there are
any
surprises.
- 3 Building the package
+ 3 Building the package (without the docs)
Have a modern setuptools installed, for cocos 0.6.0 setuptools 3.3 was
used
to build the release
Cmds to build:
svn checkout
http://los-cocos.googlecode.com/svn/trunk/ cocos_trunk
cd cocos_trunk
- svn export . ../cocos_export
- cd ..\cocos_export
+ svn export . ../cocos_build
+ cd ..\cocos_build
py -2.6 setup.py sdist >../sdist.log
- [ the generated package will be in cocos_export/dist ]
+ [ the generated package will be in cocos_build/dist ]
Verify all is including by decompressing the generated .gz or .zip and
comparing with a diff tool cocos_trunk and the decompressed one. (used
WinMerge in windows)
@@ -55,7 +55,27 @@
import pyglet and import cocos fails as before, restore your normal
machinery to handle multiple package versions for cocos and pyglet
- 5 Updating
cocos2d.org site
+ 5 Final build including docs
+ [ svn checkout
http://los-cocos.googlecode.com/svn/trunk/
cocos_trunk ]
+ cd cocos_trunk
+ svn export . ../cocos_docs
+ svn export . ../cocos_build
+
+ cd ../cocos_docs/docgen
+ make clean
+ make html
+
+ py -2.6 ../tools/copy_docs.py
+ cd ../../cocos_build
+ py -2.6 setup.py sdist
+ [ the generated package will be in cocos_build\dist , docs will show
at doc/html in the package archive ]
+
+ In unix like replace
+ py -2.6 -> python
+ make ->Makefile
+ It should work with python 2.6, 2.7, 3.3+ , tested with 2.6 and 3.3
+
+ 6 Updating
cocos2d.org site
the ftp URL points to a general directory with things not to touch;
we are interested in a subset of www directory (which also holds other
things ).