summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2020-08-10 16:49:51 +0300
committerGitHub <noreply@github.com>2020-08-10 15:49:51 +0200
commitbc8438bda4b33930d9bfa6e56efd74e111900be4 (patch)
tree8945d84a9712b52d87c1f85a9651a55c9795cd60 /docs
parentce79e44d14f151e37316144f66dedb2ace2f37dc (diff)
downloadtablib-bc8438bda4b33930d9bfa6e56efd74e111900be4.tar.gz
Stop using pkg_resources
tablib imports pkg_resources in order to find its own version. Importing pkg_resources is very slow (100ms-250ms is common). Avoid it by letting setuptools-scm generate a file with the version instead.
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 2294b30..eb706c9 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -9,7 +9,7 @@
#
# All configuration values have a default; values that are commented out
# serve to show the default.
-from pkg_resources import get_distribution
+import tablib
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -49,9 +49,9 @@ copyright = '2019 Jazzband'
# built documents.
#
# The full version, including alpha/beta/rc tags.
-release = get_distribution('tablib').version
+release = tablib.__version__
# The short X.Y version.
-version = '.'.join(release.split('.')[:2])
+version = '.'.join(tablib.__version__.split('.')[:2])
# for example take major/minor
# The language for content autogenerated by Sphinx. Refer to documentation