feat: initialize scripts of any language with pixi init --script - #6929
feat: initialize scripts of any language with pixi init --script#6929Hofer-Julian wants to merge 1 commit into
pixi init --script#6929Conversation
pixi init --manifest-path
a89860f to
6bf1b30
Compare
6bf1b30 to
c93c6d6
Compare
pixi init --manifest-pathpixi init <PATH>
c93c6d6 to
0307fdc
Compare
0307fdc to
2109892
Compare
pixi init <PATH>pixi init <PATH>
2109892 to
4f9d31c
Compare
4f9d31c to
ab7bc53
Compare
ab7bc53 to
efa0d3c
Compare
889c77e to
5c7d4d1
Compare
5c7d4d1 to
78a56f2
Compare
|
I'm not a huge fan of this change. Now we have to make a decision what a file extention is vs a path. I did like the consistency of |
As discussed, I don't really agree with your point of view. But I do see where you are coming from, and I can live with the old behavior. |
78a56f2 to
f334e34
Compare
pixi init <PATH>pixi init --script
f334e34 to
56f580b
Compare
`pixi init --script <PATH>` picks the block from the file extension. A Python file gets a PEP 723 block, and every other known extension gets a `conda-script` block from a per-language template with the comment prefix, an entrypoint that runs immediately, the toolchain dependency and a hello-world body for fresh files. `--format` gains `pep723` and `conda-script` to override that default, so `pixi init --script main.py --format conda-script` creates a conda-script Python file. Unknown extensions error and list the supported ones. `--script` names one path, so passing a workspace directory next to it errors with the combined path to use instead: `pixi init --script main.mojo some_directory` points at `pixi init --script some_directory/main.mojo`.
56f580b to
81bddf7
Compare
pixi init --script <PATH>picks the block from the file extension (#3751).--formatgainspep723andconda-scriptto override that default--scriptnames one path, so a workspace directory next to it errors with the combined path to use instead:pixi init --script main.mojo some_directorypoints atpixi init --script some_directory/main.mojo