marcotcr / checklist

Beyond Accuracy: Behavioral Testing of NLP models with CheckList
MIT License
2.01k stars 204 forks source link

Invoking pip in setup.py breaks custom flags #119

Closed sarnthil closed 1 year ago

sarnthil commented 2 years ago

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?)

eddie-scio commented 2 years ago

+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.

marcotcr commented 2 years ago

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,

eddie-scio commented 2 years ago

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

yukw777 commented 2 years ago

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

ecederstrand commented 1 year ago

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.