marcotcr / checklist

Beyond Accuracy: Behavioral Testing of NLP models with CheckList

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invoking pip in setup.py breaks custom flags

sarnthil opened this issue · comments

Any flags passed to pip while installing checklist are not handed to the subprocess that is used to install jupyter. This makes it so that this can't be installed when using a custom --index-url (e.g. when installing checklist while in a restricted environment without internet access).

(Why is jupyter not just a normal dependency?)

+1 to this -- having a free-flying dependency not actually expressed in install_requires also prevents various other tools (e.g. pip-tools) from freezing dependencies correctly.

Sorry for the delay. I don't know why this is the case, Jupyter is a dependency. Am I missing something, and is there an easy way to fix this?
Thanks,

Basically, why is there a subprocess that calls pip install jupyter here?

I came from python-poetry/poetry#5068. jupyter is already specified as a dependency. You shouldn't run a command to install it again as @eddie-scio pointed out.

Installing and enabling a Jupyter extension is not something that should happen during package build. You could add jupyter to build_requires but then you're enabling the extension in a jupyter that will be uninstalled when the build completes, which is pointless.

Arguably, it should be up to the user to enable the extension manually, but at least BuildPyCommand, BdistEggCommand and EggInfoCommand should just go away.