kirbs- / hide_code

Code, prompt and output hiding for Jupyter/IPython notebooks.
MIT License
371 stars 44 forks source link

hide-code v0.5.5 cannot be installed via pypi #87

Closed vEpiphyte closed 3 years ago

vEpiphyte commented 4 years ago

Attempting to installed hide-code v0.5.5 via pypi fails.

/tmp$ cd hct

/tmp/hct$ pyenv virtualenv --copies 3.7.3 hct373
Looking in links: /tmp/tmpggck3j43
Requirement already satisfied: setuptools in /home/user/.pyenv/versions/3.7.3/envs/hct373/lib/python3.7/site-packages (40.8.0)
Requirement already satisfied: pip in /home/user/.pyenv/versions/3.7.3/envs/hct373/lib/python3.7/site-packages (19.0.3)

/tmp/hct$ pyenv local hct373

(hct373) /tmp/hct$ python -m pip install -U wheel pip
Collecting wheel
  Using cached https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl
Collecting pip
  Using cached https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl
Installing collected packages: wheel, pip
  Found existing installation: pip 19.0.3
    Uninstalling pip-19.0.3:
      Successfully uninstalled pip-19.0.3
Successfully installed pip-20.0.2 wheel-0.34.2

(hct373) /tmp/hct$ python -m pip freeze

(hct373) /tmp/hct$ python -V
Python 3.7.3

(hct373) /tmp/hct$ python -m pip install hide-code
Collecting hide-code
  Downloading hide_code-0.5.5.tar.gz (15 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/user/.pyenv/versions/hct373/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2vp2v832/hide-code/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2vp2v832/hide-code/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-2vp2v832/hide-code/pip-egg-info
         cwd: /tmp/pip-install-2vp2v832/hide-code/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2vp2v832/hide-code/setup.py", line 9, in <module>
        import notebook
    ModuleNotFoundError: No module named 'notebook'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

It looks like the change to setup.py #83 makes the assumption that jupyter/notebook libraries are available apriori.

This has broken CI tests for a project ( https://github.com/vertexproject/synapse/ ) that uses hide-code as part of its documentation test/generation workflows.

vEpiphyte commented 4 years ago

We rolled a temporary constraint into this PR to unblock our project (linked back to issues in this repo seems to fail) here https://github.com/vertexproject/synapse/pull/1527

kirbs- commented 3 years ago

Resolved in v0.6.0. Install with pip install hide_code[all].