From bd830f679b873a872c102e7a5181c5e8b9d7d7c9 Mon Sep 17 00:00:00 2001 From: sinoroc Date: Mon, 26 Aug 2019 18:26:19 -0400 Subject: Specify extras for gettext message extractors Added "babel" and "lingua" dependency entries to the setuptools entrypoints for the babel and lingua extensions, so that pkg_resources can check that these extra dependencies are available, raising an informative exception if not. Pull request courtesy sinoroc. Fixes: #304 Closes: #305 Pull-request: https://github.com/sqlalchemy/mako/pull/305 Pull-request-sha: 9a1c9a2242a41b553af2524381ab69c2e404a778 Change-Id: I973081a17ed27bf2f954d73133b0d52855bcacff --- doc/build/unreleased/304.rst | 10 ++++++++++ setup.py | 12 ++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 doc/build/unreleased/304.rst diff --git a/doc/build/unreleased/304.rst b/doc/build/unreleased/304.rst new file mode 100644 index 0000000..79921d7 --- /dev/null +++ b/doc/build/unreleased/304.rst @@ -0,0 +1,10 @@ +.. change:: + :tags: bug, ext + :tickets: 304 + + Added "babel" and "lingua" dependency entries to the setuptools entrypoints + for the babel and lingua extensions, so that pkg_resources can check that + these extra dependencies are available, raising an informative + exception if not. Pull request courtesy sinoroc. + + diff --git a/setup.py b/setup.py index fd5a89e..9e14132 100644 --- a/setup.py +++ b/setup.py @@ -77,12 +77,20 @@ setup( css+mako = mako.ext.pygmentplugin:MakoCssLexer [babel.extractors] - mako = mako.ext.babelplugin:extract + mako = mako.ext.babelplugin:extract [babel] [lingua.extractors] - mako = mako.ext.linguaplugin:LinguaMakoExtractor + mako = mako.ext.linguaplugin:LinguaMakoExtractor [lingua] [console_scripts] mako-render = mako.cmd:cmdline """, + extras_require={ + 'babel': [ + 'Babel', + ], + 'lingua': [ + 'lingua', + ], + }, ) -- cgit v1.2.3