From caf383586dcf4be2b3262d5e8aa4a8ce8d2cc79c Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Fri, 2 Feb 2018 15:46:22 +0000 Subject: [PATCH] Revert version number in sphinx to use setuptools_scm. --- docs/conf.py | 7 +++---- setup.py | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 92ea397bd..2600e7e3c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -138,11 +138,10 @@ def handle_item(fieldarg, content): # |version| and |release|, also used in various other places throughout the # built documents. # -# Following advice from setuptools_scm at -# https://github.com/pypa/setuptools_scm try: - release = pkg_resources.get_distribution('msprime').version - version = '.'.join(release.split('.')[:2]) + from setuptools_scm import get_version + release = get_version(root='..', relative_to=__file__) + version = release[:3] except pkg_resources.DistributionNotFound: release = "0.0.0" version = "0.0.0" diff --git a/setup.py b/setup.py index ab16545fc..3e85609db 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,6 @@ warn("numpy not available. Some features will not work.") - class PathConfigurator(object): """ A class to attempt configuration of the compile search paths