[docutils:bugs] #479 scripts install with broken shebang
"Jason R. Coombs via Docutils-develop" <[email protected]>
| Newsgroups | gmane.text.docutils.devel |
|---|---|
| Message-ID | </p/docutils/bugs/479/a0166cf4962abeb5fab051e65f884249ba6e17b5.bugs@docutils.p.sourceforge.net> |
The upstream pipx issue is https://github.com/pypa/pipx/issues/1198.
---
**[bugs:#479] scripts install with broken shebang**
**Status:** closed-invalid
**Created:** Mon Feb 19, 2024 07:25 AM UTC by Jason R. Coombs
**Last Updated:** Mon Mar 25, 2024 01:57 PM UTC
**Owner:** nobody
The way docutils presents its executable scripts is broken on macOS.
Today, I installed docutils using pipx.
```
@ pipx install docutils
installed package docutils 0.20.1, installed using Python 3.12.2
These apps are now globally available
- docutils
- rst2html.py
- rst2html4.py
- rst2html5.py
- rst2latex.py
- rst2man.py
- rst2odt.py
- rst2odt_prepstyles.py
- rst2pseudoxml.py
- rst2s5.py
- rst2xetex.py
- rst2xml.py
- rstpep2html.py
done! ✨ 🌟 ✨
```
Quick aside, it would be nice if these executables didn't have the .py extension.
After installing, the scripts failed with this error:
```
@ rst2html.py docs/*
xonsh: subprocess mode: command not found: '/Users/jaraco/Library/Application'
```
The problem is that pipx, by default, installs its data into the "Application Support" directory:
```
@ pipx environment | grep HOME
PIPX_HOME=
PIPX_HOME=/Users/jaraco/Library/Application Support/pipx
```
And when it does, the scripts get installed with an invalid shebang because [Unix doesn't support spaces in shebangs](https://blog.jaraco.com/unix-doesnt-support-spaces-in-filenames/):
```
@ head -n 1 $(which rst2html.py)
#!/Users/jaraco/Library/Application Support/pipx/venvs/docutils/bin/python
```
---
Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.