{ "id": "63974", "key": "TIMOB-3342", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11249", "name": "Sprint 2011-14", "archived": true, "released": true, "releaseDate": "2011-04-11" }, { "id": "11260", "description": "", "name": "Release 1.6.2", "archived": true, "released": true, "releaseDate": "2011-04-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-18T09:13:51.000+0000", "created": "2011-04-15T03:42:31.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "build", "ios", "klist", "module", "release-1.6.2", "release-1.7.0", "rplist", "tooling" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-18T09:13:51.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
Problem
\nWhen you build a module from Titanium.py the build.py file that\nis created is not finding the LICENSE file.
\nError
\n\nTraceback (most recent call last):\n File \"/mymodule/build.py\", line 187, in <module>\n validate_license()\n File \"/mymodule/build.py\", line 99, in validate_license\n c = open('LICENSE').read()\nIOError: [Errno 2] No such file or directory: 'LICENSE'
\n
\nSuggested Fix
\nModify lines 99-100 to:
\n path = os.path.join(cwd,'LICENSE')\n x = open(path)\n c = x.read()
\n
\nTicket Reference
\nFor QE: to re-create this and test the fix, run this from the\nterminal ...
\n\n$ $TI_SDK/titanium.py create --platform=iphone --type=module --name=flubber --id=com.example.flubber
\n
\n... to create the module, where $TI_SDK should be replaced with\nthe full path to the SDK, such as ...
\n\n$ /Library/Application\\ Support/Titanium/mobilesdk/osx/1.7.0/titanium.py create --platform=iphone --type=module --name=flubber --id=com.example.flubber
\n
\nAfter the module is then created, do ...
\n\n$ flubber/build.py
\n
\nYou should get the error described above, until you have\ninstalled the fix. NOTE: if you happen to do\n../build.py
from inside the module directory, it works\nfine - you won't then see the error. The point is, you need to run\nbuild.py when your current working directory is not the\nmodule directory.
(from [2b9f545c435acbfbb83fd2675f34a9b82414db8c])\nCheck for LICENSE in correct folder. [#3342]\n\nhttps://github.com/appcelerator/titanium_mobile/commit/2b9f545c435a...
(from [6377a692c47cd79b22c9f8500f4de61a640d6285])\nCheck for LICENSE in correct folder. [#3342]\n\nhttps://github.com/appcelerator/titanium_mobile/commit/6377a692c47c...
Cherry-picked also to 1_6_X.
Note that iphone modules that already exist are not\naided by this fix, since the build.py file is copied to the module\nfolder when the module is created. So if you have an existing\nmodule and you want this fix, you need to ...
\nInstall the fixed version of the SDK, of course.
\nCopy the build.py from the SDK's\nmodule/iphone/templates
folder to your module's\nfolder.