#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import setuptools_scm

extensions = [
    'sphinx.ext.autodoc',
    'rst.linker',
]

# General information about the project.
project = 'skeleton'
copyright = '2016 Jason R. Coombs'

# The short X.Y version.
version = setuptools_scm.get_version(root='..', relative_to=__file__)
# The full version, including alpha/beta/rc tags.
release = version

master_doc = 'index'

link_files = {
	'CHANGES.rst': dict(
		using=dict(
			GH='https://github.com',
			project=project,
		),
		replace=[
			dict(
				pattern=r"(Issue )?#(?P<issue>\d+)",
				url='{GH}/jaraco/{project}/issues/{issue}',
			),
			dict(
				pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n",
				with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
			),
		],
	),
}

@@ -48,30 +48,29 @@
 %0Aimport 
-setuptools_scm
+pkg_resources
 %0A%0Aextens
@@ -262,67 +262,49 @@
 n = 
-setuptools_scm.get_version(root='..', relative_to=__file__)
+pkg_resources.require(project)%5B0%5D.version
 %0A# T

Use pkg_resources to resolve the version. Requires that the necessary package metadata have been built before building docs.