Commits

Anonymous committed fdf70a7

Fixed color.c for Symbian
Updated Symbian build instructions
Updated makeref.py with '--no-code-docs' feature to set empty module docstrings.

Comments (0)

Files changed (3)

     return files
 
 def Run():
+    
+    from optparse import OptionParser    
+    parser = OptionParser()
+    parser.add_option("", "--no-code-docs", dest="have_code_docs",
+                      action="store_false", default=True,
+                      help="No python documentation in code.")
+    (options, args) = parser.parse_args()
+
     files = collect_doc_files()
     for file in files:
         # print file
     outFile = open(os.path.join("src", "pygamedocs.h"), "w")
     outFile.write("/* Auto generated file: with makeref.py .  Docs go in src/ *.doc . */\n")
     for doc in justDocs:
-        WriteDocHeader(outFile, doc)
+        WriteDocHeader(outFile, doc, options.have_code_docs)
 
 
     outFile.write("\n\n/* Docs in a comments... slightly easier to read. */\n\n\n/*")
 
 
 
-def WriteDocHeader(f, doc):
+def WriteDocHeader(f, doc, have_code_docs ):
     name = doc.fullname.replace(".", "")
     name = name.replace("_", "")
     name = name.upper()
     defineName = "DOC_" + name
     text = ""
-    if doc.protos:
-        text = "\\n".join(doc.protos)
-    if doc.descr:
-        if text:
-            text += "\\n"
-        text += doc.descr
+    if have_code_docs:
+        if doc.protos:
+            text = "\\n".join(doc.protos)
+        if doc.descr:
+            if text:
+                text += "\\n"
+            text += doc.descr
     
     f.write('#define %s "%s"\n\n' % (defineName, text))
 
     if doc.kids:
         for kid in doc.kids:
-            WriteDocHeader(f, kid)
+            WriteDocHeader(f, kid, have_code_docs)
 
 def WriteDocHeaderComments(f, doc):
     name = doc.fullname
         MODINIT_ERROR;
     }
 
-    colordict = PyImport_ImportModule (IMPPREFIX "colordict");
+    colordict = PyImport_ImportModule ("pygame.colordict");
     if (colordict)
     {
         PyObject *_dict = PyModule_GetDict (colordict);
 #if PY3
     module = PyModule_Create (&_module);
 #else
-    module = Py_InitModule3 ("color", NULL, _color_doc);
+    module = Py_InitModule3 ( MODPREFIX "color", NULL, _color_doc);
 #endif
     if (module == NULL) {
         Py_DECREF (_COLORDICT);

symbian/how_to_build.txt

 
 === Building ===
 
-==== Using the release building script ====
-- Go to pygame/symbian directory
+==== Basic configuration ====
+
+1. Get certificates for the installer.
+-- http://wiki.forum.nokia.com/index.php/Creating_and_using_self-signed_certificate
+2. Go to pygame/symbian directory
+3. Run configure.py
+-- python configure.py cert=<path to .cer> privkey=<path to .key> passphrase=<password>
+-- Now you don't need to give this information each time you build.
+
+==== Optional configurations ====
 
 The pygame can be built against the official(or any) pys60 version. 
-Initialize the release script by giving it information about the python dll to be linked with
-and the sis file to be embedded.( UID is read directly from the sis package )
-- TODO: Not implemented yet!!
-- configure.py pythondll=python222 pys60_sis=Python_1.4.5_3rdEd.sis
-- configure.py pythondll=python25  pys60_sis=Python_1.9.0_3rdEd.sis
+
+- Initialize the release script by giving it information about the python dll to be linked with
+- Optionally the sis file to be embedded.( UID is read directly from the sis package )
+configure.py pythondll=python25 pys60_sis=Python_1.9.0_3rdEd.sis
 
 or
+!!! DEPRECATED. PyS60 CE based on Python 2.2 and not supported anymore. Maybe in the future.
 
 - Use BuildPygameRelease.py script to build the 'pygame_python' with PyS60 Community Edition,
   the depended libraries and the pygame itself. All in one.
 # Use existing python sis. Need to configure the python dll for linker.
 configure.py build_python=False pys60_sis=official_python.sisx pythondll=python222.dll
 
+
 ==== Do the build ====
 
 Emulator:
 
 Device:
 - Run: BuildPygameRelease.py compiler=gcce release=urel
--- NOTE: The you can set your certificate information with configure.py
 
 
 === Misc info ===