[TIMOB-3342] Module build.py missing LICENSE
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-05-18T09:13:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-14, Release 1.6.2 |
Components | iOS |
Labels | build, ios, klist, module, release-1.6.2, release-1.7.0, rplist, tooling |
Reporter | Alan Leard |
Assignee | Reggie Seagraves |
Created | 2011-04-15T03:42:31.000+0000 |
Updated | 2011-05-18T09:13:51.000+0000 |
Description
Problem
When you build a module from Titanium.py the build.py file that is created is not finding the LICENSE file.
Error
Traceback (most recent call last):
File "/mymodule/build.py", line 187, in <module>
validate_license()
File "/mymodule/build.py", line 99, in validate_license
c = open('LICENSE').read()
IOError: [Errno 2] No such file or directory: 'LICENSE'
Suggested Fix
Modify lines 99-100 to:
path = os.path.join(cwd,'LICENSE')
x = open(path)
c = x.read()
Ticket Reference
http://developer.appcelerator.com/helpdesk/view/76398">http://developer.appcelerator.com/helpdesk/view/76398
For QE: to re-create this and test the fix, run this from the terminal ...
... to create the module, where $TI_SDK should be replaced with the full path to the SDK, such as ...
After the module is then created, do ...
You should get the error described above, until you have installed the fix. NOTE: if you happen to do
../build.py
from inside the module directory, it works fine - you won't then see the error. The point is, you need to run build.py when your current working directory is not the module directory.(from [2b9f545c435acbfbb83fd2675f34a9b82414db8c]) Check for LICENSE in correct folder. [#3342] https://github.com/appcelerator/titanium_mobile/commit/2b9f545c435acbfbb83fd2675f34a9b82414db8c"> https://github.com/appcelerator/titanium_mobile/commit/2b9f545c435a...
(from [6377a692c47cd79b22c9f8500f4de61a640d6285]) Check for LICENSE in correct folder. [#3342] https://github.com/appcelerator/titanium_mobile/commit/6377a692c47cd79b22c9f8500f4de61a640d6285"> https://github.com/appcelerator/titanium_mobile/commit/6377a692c47c...
Cherry-picked also to 1_6_X.
Note that iphone modules that already exist are not aided by this fix, since the build.py file is copied to the module folder when the module is created. So if you have an existing module and you want this fix, you need to ...
Install the fixed version of the SDK, of course.
Copy the build.py from the SDK's
module/iphone/templates
folder to your module's folder.RC1, osx, win7