scipy: BUG: Build failure due to problems with shebang line in cythoner.py
I ran into a problem running dev.py
that appears to be caused by the shebang line #!python3
in the file scipy/_build_utils/cythoner.py
. If I change it to #!/usr/bin/env python
then the build works fine.
Most files in scipy with a shebang line use #!/usr/bin/env python
. Only files in the _build_utils
use #!python3
.
Error message when running python dev.py build
:
Meson build setup OK
💻 ninja -C /mnt/c/Users/Jozsef/OSS/scipy-test/build
ninja: Entering directory `/mnt/c/Users/Jozsef/OSS/scipy-test/build'
[3/1562] Generating 'scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c'.
FAILED: scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c
/mnt/c/Users/Jozsef/OSS/scipy-test/scipy/_build_utils/cythoner.py ../scipy/_lib/_ccallback_c.pyx scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c
/bin/sh: 1: /mnt/c/Users/Jozsef/OSS/scipy-test/scipy/_build_utils/cythoner.py: not found
[12/1562] Compiling C++ object scipy/_lib/_uarray/_uarray.cpython-310-x86_64-linux-gnu.so.p/_uarray_dispatch.cxx.o
ninja: build stopped: subcommand failed.
Build failed!
If I try running cythoner.py
directly:
-bash: /mnt/c/Users/Jozsef/OSS/scipy-conda/scipy/_build_utils/cythoner.py: python3: bad interpreter: No such file or directory
I’m using conda with WSL (Ubuntu).
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- BLD: fix invalid shebang for build helper script Shebangs do not work this way, but Meson could usually paper over the differences by noticing that the last element is "python3" and rewiring it to us... — committed to eli-schwartz/scipy by eli-schwartz 2 years ago
- BLD: fix invalid shebang for build helper script Shebangs do not work this way, but Meson could usually paper over the differences by noticing that the last element is "python3" and rewiring it to us... — committed to ev-br/scipy by eli-schwartz 2 years ago
- BLD: fix invalid shebang for build helper script Shebangs do not work this way, but Meson could usually paper over the differences by noticing that the last element is "python3" and rewiring it to us... — committed to tylerjereddy/scipy by eli-schwartz 2 years ago
The issue seems to be fixed, so I’ll close it. I ran a search for a other shebang lines in the scipy repo and all of them have been changed to
#!/usr/bin/env python
or#!/usr/bin/env python3
, which both work fine.