dnanhkhoa / nb_black

A simple extension for Jupyter Notebook and Jupyter Lab to beautify Python code automatically using black.
MIT License
367 stars 41 forks source link

New release? #38

Open max-sixty opened 2 years ago

max-sixty commented 2 years ago

Creating a specific issue for https://github.com/dnanhkhoa/nb_black/issues/32#issuecomment-1028469823 — would it be possible to create a new release for the library?

Thanks!

dhendry commented 1 year ago

It would be great to get a fix for this released

monopoly-db commented 1 year ago

Ran into this issue today while building a jupyter container image.

#0 6.419 Collecting nb_mypy
#0 6.519   Downloading nb_mypy-1.0.4-py3-none-any.whl (7.4 kB)
#0 6.587 Collecting nb_black
#0 6.648   Downloading nb_black-1.0.7.tar.gz (4.8 kB)
#0 6.661   Preparing metadata (setup.py): started
#0 6.764   Preparing metadata (setup.py): finished with status 'error'
#0 6.768   error: subprocess-exited-with-error
#0 6.768   
#0 6.768   × python setup.py egg_info did not run successfully.
#0 6.768   │ exit code: 1
#0 6.768   ╰─> [3 lines of output]
#0 6.768       error in nb_black setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after name and no valid version specifier)
#0 6.768           yapf >= '0.28'; python_version < '3.6'
#0 6.768                ^
#0 6.768       [end of output]
#0 6.768   
#0 6.768   note: This error originates from a subprocess, and is likely not a problem with pip. 
#0 6.769 error: metadata-generation-failed
#0 6.769 
#0 6.769 × Encountered error while generating package metadata.
#0 6.769 ╰─> See above for output.
#0 6.769 
#0 6.769 note: This is an issue with the package mentioned above, not pip.
#0 6.769 hint: See above for details.
leifdenby commented 1 year ago

It's not much of a fix, but I've forked the repo and simplified setup.py to drop python2 support. You can install my fork with:

python -m pip install git+https://github.com/leifdenby/nb_black/#egg=nb_black