GeezerVison is showing github.com — add zipapp support by asottile · Pull Request #1616 · pre-commit/pre-commit
Conversation
seems to work!
$ ./pre-commit-2.7.1.pyz run flake8 --all-files
flake8...................................................................Passed
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
doesn't quite work on windows yet -- I probably need the shebang code here as well:
C:\Users\Anthony\workspace\babi>python E:\VMs\Ubuntu20.04_shared\pre-commit-2.7.1.pyz run --all-files
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8.
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8:flake8-typing-imports==1.7.0.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-autopep8.
[INFO] Initializing environment for https://github.com/asottile/reorder_python_imports.
[INFO] Initializing environment for https://github.com/asottile/pyupgrade.
[INFO] Initializing environment for https://github.com/asottile/setup-cfg-fmt.
[INFO] Installing environment for https://gitlab.com/pycqa/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('C:\\Users\\Anthony\\.cache\\pre-commit-zipapp\\SuNk3yXatwvuqrztl46R2--u3qyqevT15p2e3M1XeSM\\fakepython', '-mvirtualenv', 'C:\\Users\\Anthony\\.cache\\pre-commit\\repo0di586bv\\py_env-python3.7', '-p', 'C:\\Users\\Anthony\\.cache\\pre-commit-zipapp\\SuNk3yXatwvuqrztl46R2--u3qyqevT15p2e3M1XeSM\\fakepython')
return code: 1
expected return code: 0
stdout:
Executable `python3` not found
stderr: (none)
Check the log at C:\Users\Anthony\.cache\pre-commit\pre-commit.log
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
asottile
commented
Sep 24, 2020
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
looks like this is going to need #1617 on windows :(
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
windows needs more work as well, probably need to write a shim python.bat (I couldn't get python.py via python to work for whatever reason -- though it works from cmd.exe)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
looks like a .bat isn't going to work either, so I should probably attempt to do this with a .exe :(
almost everything works, like out.pyz run --all-files works fine and dandy
but running from git commit does not work on windows:
C:\Users\Anthony\workspace\babi>git commit -m "foo"
Traceback (most recent call last):
File ".git/hooks/pre-commit", line 42, in <module>
raise SystemExit(subprocess.call(CMD))
File "C:\Python37\lib\subprocess.py", line 323, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Python37\lib\subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "C:\Python37\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
and I feel like that's kinda important :)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
made a shim .exe and it seems to work!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|