{ "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

\n

When you build a module from Titanium.py the build.py file that\nis created is not finding the LICENSE file.

\n

Error

\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
\n

Suggested Fix

\n

Modify lines 99-100 to:

\n
\n path = os.path.join(cwd,'LICENSE')\n            x = open(path)\n            c = x.read()\n
\n

Ticket Reference

\n

http://developer.appcelerator.com/helpdesk/view/76398

{html}", "attachment": [], "flagged": false, "summary": "Module build.py missing LICENSE", "creator": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130565", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

For 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
\n

After the module is then created, do ...

\n
\n$ flubber/build.py\n
\n

You 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.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:42:32.000+0000", "updated": "2011-04-15T03:42:32.000+0000" }, { "id": "130566", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [2b9f545c435acbfbb83fd2675f34a9b82414db8c])\nCheck for LICENSE in correct folder. [#3342]\n\nhttps://github.com/appcelerator/titanium_mobile/commit/2b9f545c435a...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:42:33.000+0000", "updated": "2011-04-15T03:42:33.000+0000" }, { "id": "130567", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [6377a692c47cd79b22c9f8500f4de61a640d6285])\nCheck for LICENSE in correct folder. [#3342]\n\nhttps://github.com/appcelerator/titanium_mobile/commit/6377a692c47c...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:42:33.000+0000", "updated": "2011-04-15T03:42:33.000+0000" }, { "id": "130568", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Cherry-picked also to 1_6_X.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:42:33.000+0000", "updated": "2011-04-15T03:42:33.000+0000" }, { "id": "130569", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

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 ...

\n
{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:42:34.000+0000", "updated": "2011-04-15T03:42:34.000+0000" }, { "id": "133874", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "RC1, osx, win7", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-18T09:13:51.000+0000", "updated": "2011-05-18T09:13:51.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }