fmt/doc-build-removed-all-pip-internet-stuff.patch
Kefu Chai 591078f81f update to 5.2.1
- split fmt_build_doc_system.patch into smaller patches, to simplify
  the patch management
- drop fmt_test8_segfault.patch, as it does not apply anymore
- add patches to avoid accessing to internet via installed document
- use python3 packages to adapt fedora python3 migration
- drop fmt-static package, as it's non-trivial to build static and
  shared libraries in a single run. and it's not encouraged to ship
  static library, see
https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries_2
- package ChangeLog.rst README.rst in fmt package, to help use
  to understand the latest changes, and to silence rpmlint warnings
- pass cmake options in multiple lines, to have less code churn of
  future changes.
- drop DCMAKE_SKIP_RPATH=OFF, as RHEL6 is not supported anymore
- use %make_build and %make_install macros, see
  https://fedoraproject.org/wiki/Packaging:Cmake
- bump up packaged fmt to v5.2.1

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2018-10-13 11:21:59 +08:00

73 lines
3.0 KiB
Diff

From: "Eugene V. Lyubimkin" <jackyf@iki.fi>
Date: Sat, 7 Nov 2015 18:55:28 +0100
Subject: doc: build: removed all pip/internet stuff
Debian package must only use locally available packages and resources.
---
doc/build.py | 43 +------------------------------------------
1 file changed, 1 insertion(+), 42 deletions(-)
diff --git a/doc/build.py b/doc/build.py
index 5947e46..dc0d861 100755
--- a/doc/build.py
+++ b/doc/build.py
@@ -4,27 +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']
-def pip_install(package, commit=None, **kwargs):
- "Install package using pip."
- min_version = kwargs.get('min_version')
- if min_version:
- from pkg_resources import get_distribution, DistributionNotFound
- try:
- installed_version = get_distribution(os.path.basename(package)).version
- if LooseVersion(installed_version) >= min_version:
- print('{} {} already installed'.format(package, min_version))
- return
- except DistributionNotFound:
- pass
- 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):
@@ -34,30 +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.
- pip_install('sphinx-doc/sphinx', '12b83372ac9316e8cbe86e7fed889296a4cc29ee',
- min_version='1.4.1.dev20160531')
- pip_install('michaeljones/breathe',
- '129222318f7c8f865d2631e7da7b033567e7f56a',
- min_version='4.2.0')
def build_docs(version='dev', **kwargs):
doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__)))