Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing build\all.py on a clean clone fails #526

Closed
sandersaares opened this issue Sep 19, 2016 · 3 comments
Closed

Executing build\all.py on a clean clone fails #526

sandersaares opened this issue Sep 19, 2016 · 3 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly

Comments

@sandersaares
Copy link
Contributor

sandersaares commented Sep 19, 2016

  • What version of Shaka Player are you using?

b612704 (latest master branch)

  • What did you do?

Cloned repository.
Executed npm install
Executed python27 build\all.py

Environment is Windows 10, with "Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32"

  • What did you expect to happen?

A successful build process.

  • What actually happened?
Generating Closure dependencies...
Running Closure linter...
Traceback (most recent call last):
  File "c:\Source\shaka-player\third_party\gjslint\gjslint", line 29, in <module>
    from closure_linter import gjslint
  File "c:\Source\shaka-player\third_party\gjslint\closure_linter-2.3.13\closure_linter\gjslint.py", line 168
    print '%s: %d' % (path, len(path_errors))
                 ^
SyntaxError: invalid syntax
@joeyparrish
Copy link
Member

Looks like python 3 is being invoked for gjslint. @sandersaares, can you confirm if python invokes python3 in your environment?

We have 'python' hard-coded into the command lines of two of our build steps:

check.py:  cmd_line = ['python', cmd] + args + get_lint_files()
gendeps.py:    cmd_line = ['python', deps_writer] + deps_args

Perhaps those should say python2, specifically. @sandersaares, please try changing those to python2 and see if it resolves your issue.

@joeyparrish joeyparrish self-assigned this Sep 19, 2016
@sandersaares
Copy link
Contributor Author

sandersaares commented Sep 20, 2016

I confirm modifying these lines to explicitly reference Python 2 does help the build process move forward. As I believe there is no standard way to choose which version of Python to run (they all come as python.exe by default), I imagine the best fix would be to always run the same Python executable that is always running, e.g. from sys.executable.

However, now it fails with the following output:

Generating Closure dependencies...
Running Closure linter...
162 files checked, no errors found.
Running htmlhint...
Traceback (most recent call last):
  File ".\build\all.py", line 42, in <module>
    shakaBuildHelpers.run_main(main)
  File "C:\Source\shaka-player\build\shakaBuildHelpers.py", line 207, in run_main
    sys.exit(main(sys.argv[1:]))
  File ".\build\all.py", line 30, in main
    code = check.main([])
  File "C:\Source\shaka-player\build\check.py", line 157, in main
    elif not check_html_lint():
  File "C:\Source\shaka-player\build\check.py", line 80, in check_html_lint
    return subprocess.call(cmd_line) == 0
  File "c:\Python27\lib\subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "c:\Python27\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "c:\Python27\lib\subprocess.py", line 959, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

I also tried upgrading my Python 2 but this changed nothing. New version is: Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32

Exploring what the script does, it appears to be executing c:\Source\shaka-player\node_modules\.bin\htmlhint c:\Source\shaka-player\index.html c:\Source\shaka-player\demo/index.html c:\Source\shaka-player\support.html. Of course, this Linux shell script will not work on my Windows installation.

Is Windows supported as a development platform?

@joeyparrish joeyparrish added the type: bug Something isn't working correctly label Sep 20, 2016
@joeyparrish
Copy link
Member

Window is supported, but we don't test the Windows build often enough. We'll fix it. Thanks for the report!

joeyparrish pushed a commit that referenced this issue Oct 19, 2016
* Node binaries should have .cmd appended to file name.
* htmlhint cannot find .htmlhintrc file.
* Use same python environment for subprocesses.

Closes #526

Change-Id: I6b4c898b39a3e2eb8d808feb2b46b79fba5dc455
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants