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

Multiple mingw python packages have broken shebang #7481

Closed
Artoria2e5 opened this issue Dec 20, 2020 · 5 comments · Fixed by #7483
Closed

Multiple mingw python packages have broken shebang #7481

Artoria2e5 opened this issue Dec 20, 2020 · 5 comments · Fixed by #7483

Comments

@Artoria2e5
Copy link

Describe the issue

The shebang on many of the mingw python packages are currently #!D:/a/_temp/msys/msys64/mingw64/bin/python.exe. This obviously doesn't run.

Steps to Reproduce the Problem

  1. Run 'pacman -S mingw-w64-x86_64-python-black'
  2. Run 'black' and see 'bash: /mingw64/bin/cxfreeze-script.py: D:/a/_temp/msys/msys64/mingw64/bin/python.exe^M: bad interpreter: No such file or directory'
  3. Run 'less $(which black)' under mingw64

Additional Context: Operating System, Screenshots

mingw-w64-x86_64-python-black 20.8b1-1

@lazka lazka transferred this issue from msys2/MSYS2-packages Dec 20, 2020
@Biswa96
Copy link
Member

Biswa96 commented Dec 20, 2020

Hi @Artoria2e5 👋 Thank you for reporting this issue. I have sent a pull request to fix it. Packages will be uploaded after some days. Meanwhile, you could download the unsigned package from GitHub Actions artifacts in the linked pull request.

@winterz
Copy link

winterz commented Nov 3, 2021

Did I install something incorrectly? I'm seeing this in pylint


#!D:/a/_temp/msys/msys64/mingw64/bin/python.exe
from pylint import run_pylint

run_pylint()

I ran pacman -S mingw-w64-x86_64-python-pylint
and then tried pacman -S mingw-w64-x86_64-python3-pylint

@lazka
Copy link
Member

lazka commented Nov 3, 2021

That's likely a packaging bug (or a missing adjustment for msys2..)

@Biswa96
Copy link
Member

Biswa96 commented Nov 3, 2021

That's likely a packaging bug

Yup. The PKGBUILD edits shebang for .py files only. The rest are:

$ grep -air msys64
bin/epylint:#!D:/a/_temp/msys/msys64/mingw64/bin/python.exe
bin/pylint:#!D:/a/_temp/msys/msys64/mingw64/bin/python.exe
bin/pyreverse:#!D:/a/_temp/msys/msys64/mingw64/bin/python.exe
bin/symilar:#!D:/a/_temp/msys/msys64/mingw64/bin/python.exe

@Artoria2e5
Copy link
Author

Artoria2e5 commented Nov 20, 2021

It should be pretty safe to edit the shebang for all files regardless of name. As long as the sed command is made to only work on the first line — should be possible with putting a line number “1” in front of the “s/“ command IIRC — and to check the first line really is a shebang (expand the s/ pattern maybe).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants