Thanks @Moody and @MichaelR , this was quite helpful to learn that the nb_dev commands work under Windows if it’s installed via pip (but not via conda). I first installed it using conda, and running the commands would just pop up a .sh script for each command.
Hi @Moody, thanks for the tip about v2. I am using nbdev 2.3.8. My observation seems to be the same as yours back in 2021 with v1:
If I install nbev via conda on Windows native, then commands such as nbdev_prepare pop up a .sh file in my text editor
If I install nbdev via pip on Windows native, then nbdev_prepare uses an .exe and runs as expected
I was using Windows native because I wanted to access data on a network location and didn’t easily figure out how to get to it on Windows Subsystem for Linux (WSL). Now I’ve decided to develop my library using a test dataset and I’ve switched to WSL, where things just work so far.
There’s a really nice feature of pip/setuptools that lets you create commandline scripts directly from functions, makes them available in the PATH , and even makes your scripts cross-platform (e.g. in Windows it creates an exe).
So why does this work for pip but not for conda? I can see that nbdev’s setup.py includes the necessary section to create console_scripts. I also see nbdev/release.ipynb that release_pypi runs setup.py, while release_conda calls conda build. It’s over my head to know how the conda build process works, though! I wonder if there is a simple way to also call setup.py just to create the console_scripts entry points.
I’m just cross-referencing nbdev github issue 1149. I was at the same point as @willsa14 in reverse engineering the conda build process. I’ve authored a couple of conda packages but not with command line scripts, so unsure how to tackle and on the backburner for now.