aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsinoroc <sinoroc.code+git@gmail.com>2019-08-26 18:26:19 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-08-26 19:07:33 -0400
commitbd830f679b873a872c102e7a5181c5e8b9d7d7c9 (patch)
treeb2806cecd31e84be92e9c5cc2eade77c949f718b
parenteda9a8322eafc2ed254d832c62b23baf40f0040b (diff)
downloadexternal_python_mako-bd830f679b873a872c102e7a5181c5e8b9d7d7c9.tar.gz
external_python_mako-bd830f679b873a872c102e7a5181c5e8b9d7d7c9.tar.bz2
external_python_mako-bd830f679b873a872c102e7a5181c5e8b9d7d7c9.zip
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
-rw-r--r--doc/build/unreleased/304.rst10
-rw-r--r--setup.py12
2 files changed, 20 insertions, 2 deletions
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',
+ ],
+ },
)