diff --git a/.gitignore b/.gitignore index a33e48ea8b..e53cfe777e 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,6 @@ test/namedtests.js Vagrantfile v8.log src/internalpython.js -/tmp.js \ No newline at end of file +/tmp.js +Pipfile +package-lock.json \ No newline at end of file diff --git a/package.json b/package.json index 825a320086..f6784cc05d 100644 --- a/package.json +++ b/package.json @@ -2,29 +2,30 @@ "name": "skulpt", "version": "1.0.0", "description": "Skulpt is a Javascript implementation of Python 2.x. Python that runs in your browser!", - "keywords": ["skulpt"], + "keywords": [ + "skulpt" + ], "scripts": { - "testdebug": "./skulpt.py testdebug", - "regengooglocs": "./skulpt.py regengooglocs", - "regensymtabtests": "./skulpt.py regensymtabtests", - "rununits": "./skulpt.py rununits", - "vmwareregr": "./skulpt.py vmwareregr", - "regenparser": "./skulpt.py regenparser", - "regenasttests": "./skulpt.py regenasttests", - "regenruntests": "./skulpt.py regenruntests", - "upload": "./skulpt.py upload", - "doctest": "./skulpt.py doctest", - "doc": "./skulpt.py doc", - "browser": "./skulpt.py browser", - "debugbrowser": "./skulpt.py debugbrowser", - "vfs": "./skulpt.py vfs", - "host": "./skulpt.py host", - "repl": "./skulpt.py repl", - - "build": "./skulpt.py dist", - "build-min": "./skulpt.py dist -u", - "test": "./skulpt.py test", - "test3": "./skulpt.py test3" + "testdebug": "python skulpt.py testdebug", + "regengooglocs": "python skulpt.py regengooglocs", + "regensymtabtests": "python skulpt.py regensymtabtests", + "rununits": "python skulpt.py rununits", + "vmwareregr": "python skulpt.py vmwareregr", + "regenparser": "python skulpt.py regenparser", + "regenasttests": "python skulpt.py regenasttests", + "regenruntests": "python skulpt.py regenruntests", + "upload": "python skulpt.py upload", + "doctest": "python skulpt.py doctest", + "doc": "python skulpt.py doc", + "browser": "python skulpt.py browser", + "debugbrowser": "python skulpt.py debugbrowser", + "vfs": "python skulpt.py vfs", + "host": "python skulpt.py host", + "repl": "python skulpt.py repl", + "build": "python skulpt.py dist", + "build-min": "python skulpt.py dist -u", + "test": "python skulpt.py test", + "test3": "python skulpt.py test3" }, "repository": { "type": "git", @@ -42,6 +43,6 @@ "devDependencies": { "jshint": "~2.5.2", "jscs": "~1.12", - "jsdoc": "~3.3.2" + "jsdoc": "~3.5.5" } } diff --git a/skulpt.py b/skulpt.py index 639c904476..1c5ee49ece 100755 --- a/skulpt.py +++ b/skulpt.py @@ -176,7 +176,7 @@ def is64bit(): if sys.platform == "win32": winbase = ".\\support\\d8\\x32" - if not os.path.exists(winbase): + if not os.path.exists(winbase + "\\d8.exe"): winbase = ".\\support\\d8" os.environ["D8_PATH"] = winbase jsengine = winbase + "\\d8.exe --debugger --harmony" @@ -231,8 +231,8 @@ def test(debug_mode=False, p3=False): if sys.platform == "win32": files = list(chain.from_iterable([ glob.glob(d + "/*.js") for d in base_dirs ])) - jshintcmd = "jshint {1}".format(' '.join(files)) - jscscmd = "jscs {1} --reporter=inline".format(' '.join(files)) + jshintcmd = "jshint {0}".format(' '.join(files)) + jscscmd = "jscs {0} --reporter=inline".format(' '.join(files)) else: folders = ' '.join([ d + "/*.js" for d in base_dirs ]) jshintcmd = "jshint " + folders @@ -811,10 +811,14 @@ def dist(options): print "Couldn't copy debugger to output folder: %s" % e.message sys.exit(1) - path_list = os.environ.get('PATH','').split(':') + path_list = os.environ.get('PATH','').split(os.pathsep) + if sys.platform == "win32": + gzip_filename = "gzip.exe" + else: + gzip_filename = "gzip" has_gzip = False for p in path_list: - has_gzip = os.access(os.path.join(p,"gzip"), os.X_OK) + has_gzip = os.access(os.path.join(p,gzip_filename), os.X_OK) if has_gzip: break