Skip to content

Commit

Permalink
Merge pull request #542 from velaia/master
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 committed Apr 26, 2024
2 parents 1cb38a0 + 61ea2d1 commit 4237776
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions fastcore/xtras.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,9 @@ def console_help(
libname:str): # name of library for console script listing
"Show help for all console scripts from `libname`"
from fastcore.style import S
from pkg_resources import iter_entry_points as ep
for e in ep('console_scripts'):
if e.module_name == libname or e.module_name.startswith(libname+'.'):
from importlib.metadata import entry_points as ep_il
for e in ep_il(group='console_scripts'):
if e.value == libname or e.value.startswith(libname+'.'):
nm = S.bold.light_blue(e.name)
print(f'{nm:45}{e.load().__doc__}')

6 changes: 3 additions & 3 deletions nbs/03_xtras.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2357,9 +2357,9 @@
" libname:str): # name of library for console script listing\n",
" \"Show help for all console scripts from `libname`\"\n",
" from fastcore.style import S\n",
" from pkg_resources import iter_entry_points as ep\n",
" for e in ep('console_scripts'): \n",
" if e.module_name == libname or e.module_name.startswith(libname+'.'): \n",
" from importlib.metadata import entry_points as ep_il\n",
" for e in ep_il(group='console_scripts'): \n",
" if e.value == libname or e.value.startswith(libname+'.'): \n",
" nm = S.bold.light_blue(e.name)\n",
" print(f'{nm:45}{e.load().__doc__}')\n"
]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pkg_resources import parse_version
from packaging.version import Version
from configparser import ConfigParser
import setuptools,re,sys
assert parse_version(setuptools.__version__)>=parse_version('36.2')
assert Version(setuptools.__version__)>=Version('36.2')

# note: all settings are in settings.ini; edit there, not here
config = ConfigParser(delimiters=['='])
Expand Down

0 comments on commit 4237776

Please sign in to comment.