diff --git a/doc/build.py b/doc/build.py index 4651756e..0943505b 100755 --- a/doc/build.py +++ b/doc/build.py @@ -4,17 +4,9 @@ from __future__ import print_function import errno, os, shutil, sys, tempfile from subprocess import check_call, check_output, CalledProcessError, Popen, PIPE -from distutils.version import LooseVersion versions = ['1.0.0', '1.1.0', '2.0.0', '3.0.2', '4.0.0', '4.1.0', '5.0.0', '5.1.0', '5.2.0', '5.2.1', '5.3.0', '6.0.0', '6.1.0', '6.1.1', '6.1.2', '6.2.0', '6.2.1', '7.0.0', '7.0.1', '7.0.2', '7.0.3', '7.1.0', '7.1.1', '7.1.2', '7.1.3'] -def pip_install(package, commit=None, **kwargs): - "Install package using pip." - if commit: - package = 'git+https://github.com/{0}.git@{1}'.format(package, commit) - print('Installing {0}'.format(package)) - check_call(['pip', 'install', package]) - def create_build_env(dirname='virtualenv'): # Create virtualenv. if not os.path.exists(dirname): @@ -24,29 +16,6 @@ def create_build_env(dirname='virtualenv'): activate_this_file = os.path.join(dirname, scripts_dir, 'activate_this.py') with open(activate_this_file) as f: exec(f.read(), dict(__file__=activate_this_file)) - # Import get_distribution after activating virtualenv to get info about - # the correct packages. - from pkg_resources import get_distribution, DistributionNotFound - # Upgrade pip because installation of sphinx with pip 1.1 available on Travis - # is broken (see #207) and it doesn't support the show command. - pip_version = get_distribution('pip').version - if LooseVersion(pip_version) < LooseVersion('1.5.4'): - print("Updating pip") - check_call(['pip', 'install', '--upgrade', 'pip']) - # Upgrade distribute because installation of sphinx with distribute 0.6.24 - # available on Travis is broken (see #207). - try: - distribute_version = get_distribution('distribute').version - if LooseVersion(distribute_version) <= LooseVersion('0.6.24'): - print("Updating distribute") - check_call(['pip', 'install', '--upgrade', 'distribute']) - except DistributionNotFound: - pass - # Install Sphinx and Breathe. Require the exact version of Sphinx which is - # compatible with Breathe. - pip_install('sphinx-doc/sphinx', '12b83372ac9316e8cbe86e7fed889296a4cc29ee') - pip_install('michaeljones/breathe', - '129222318f7c8f865d2631e7da7b033567e7f56a') def build_docs(version='dev', **kwargs): doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__))) -- 2.28.0