[TIMOB-6749] iOS: 'markdown' is now 'markdown2' in python module for build.py
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-12-19T13:49:58.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | Release 1.8.0.1, Sprint 2011-51, Release 2.0.0, Release 1.8.1 |
Components | iOS |
Labels | module_module, qe-testadded |
Reporter | Tony Lukasavage |
Assignee | Marshall Culpepper |
Created | 2011-12-19T07:09:26.000+0000 |
Updated | 2012-02-02T13:25:26.000+0000 |
Description
In the [wiki documentation](https://wiki.appcelerator.org/display/guides/iOS+Module+Development+Guide#iOSModuleDevelopmentGuide-PackagingyourModule) for developing iOS modules, it notes that it is necessary to install the [python module 'markdown'](https://github.com/trentm/python-markdown2) to package your module. In TiStudio 1.0.7, this can now be done from the wizard. Unfortunately, the build.py script for packaging the module references this library as *markdown* when it now needs to be referenced as *markdown2*. Module packaging will end in error.
The area in build.py that would need to change is (starting at line 54)
import markdown
documentation = []
for file in os.listdir(docdir):
if file in ignoreFiles or os.path.isdir(os.path.join(docdir, file)):
continue
md = open(os.path.join(docdir,file)).read()
html = markdown.markdown(md)
documentation.append({file:html})
and it needs to be changed to the following to support the markdown2 import
import markdown2
documentation = []
for file in os.listdir(docdir):
if file in ignoreFiles or os.path.isdir(os.path.join(docdir, file)):
continue
md = open(os.path.join(docdir,file)).read()
html = markdown2.markdown(md)
documentation.append({file:html})
This, though, would create a failure in backwards compatibility. I'll leave that solution to someone better versed in python scripting.
Assigning to Marshall as per his request.
Sent in a pull request for this: https://github.com/appcelerator/titanium_mobile/pull/1046
Sent pull request for 1_8_X as well: https://github.com/appcelerator/titanium_mobile/pull/1052
Closing issue Tested with Ti Studio 1.0.8.201201101928 Ti Mob SDK 1.9.0.v20120111233134 OSX Lion Expected behavior of markdown2 being updated in build.py is shown