ambuda-org / vidyut

Infrastructure for Sanskrit software. For Python bindings, see `vidyut-py`.
48 stars 21 forks source link

Fixed the installation script on windows #51

Closed vbasky closed 1 year ago

vbasky commented 1 year ago

Have modified the installation script on windows to cater to vidyut 0.2.0 structural changes

akprasad commented 1 year ago

Thanks for this. What are our options for running Unix shell scripts, e.g. through these methods? If we find a way to do so, I think we can avoid breakages in the future.

vbasky commented 1 year ago

Default installation of Windows don't come with make or shell. Unless you install WSL and do it that way. But honestly, I don't think that should be needed. Rust should work as is in Windows. Since there is a dependency on python already if we find a way to do everything that .sh is doing with python as an alternative we could streamline this on windows too

akprasad commented 1 year ago

That's an interesting option. For Python, we would still need to invoke git through a subprocess call. Actually, I'm curious how that command works on Powershell -- does it recognize the syntax of the git command by default?

vbasky commented 1 year ago

Python and git are standard packages in Windows package managers (choco or winget) that can be installed similar to ones available in brew or apt. I had git installed so it understands the commands. There isn't one to make .sh work inside the windows environment that works well with Powershell. Even the support for Make is debatable on Windows. For eg: I am unable to set the encoding right when invoking make for the train_cheda or eval_cheda commands. The IAST encodings for Mahābhārata seems to be broken. So lesser the tools needed better.

vbasky commented 1 year ago

Do you think this PR is good enough or are there any suggestions ?

akprasad commented 1 year ago

Sorry for the delay. I'll check this in for now. If it breaks in the future, let's consider centralizing on Python.

shreevatsa commented 1 year ago

(Was typing this just as Arun's comment came in…)

FWIW, I took a look and it seems good / I have no suggestions, though will leave it to Arun to review and merge…

At a higher level, I think having separate .sh and .ps1 scripts is eventually going to diverge / hard to maintain, so I think the lessons is that we should eventually move away from using these scripts: do everything in Python or whatever. (I was recently reading https://matklad.github.io/2023/02/12/a-love-letter-to-deno.html — see from the first occurrence of "shell" in the post to the last one — not that we should use Deno but doing everything in Python seems reasonable.)

akprasad commented 1 year ago

@shreevatsa agreed -- filed #52 as a tracking issue.