parent
fc812efdd4
commit
56e55afdaa
@ -1,23 +0,0 @@
|
||||
diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html
|
||||
index 333a606c..8ff160de 100644
|
||||
--- a/doc/_templates/layout.html
|
||||
+++ b/doc/_templates/layout.html
|
||||
@@ -5,15 +5,6 @@
|
||||
<meta name="keywords" content="C++, formatting, printf, string, library">
|
||||
<meta name="author" content="Victor Zverovich">
|
||||
<link rel="stylesheet" href="_static/fmt.css">
|
||||
-{# Google Analytics #}
|
||||
-<script async src="https://www.googletagmanager.com/gtag/js?id=UA-20116650-4"></script>
|
||||
-<script>
|
||||
- window.dataLayer = window.dataLayer || [];
|
||||
- function gtag(){dataLayer.push(arguments);}
|
||||
- gtag('js', new Date());
|
||||
-
|
||||
- gtag('config', 'UA-20116650-4');
|
||||
-</script>
|
||||
{% endblock %}
|
||||
|
||||
{%- macro searchform(classes, button) %}
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,49 +0,0 @@
|
||||
diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html
|
||||
index 8ff160de..85eba08d 100644
|
||||
--- a/doc/_templates/layout.html
|
||||
+++ b/doc/_templates/layout.html
|
||||
@@ -42,16 +42,6 @@
|
||||
{# Collect the nav links, forms, and other content for toggling #}
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
- <li class="dropdown">
|
||||
- <a href="#" class="dropdown-toggle" data-toggle="dropdown"
|
||||
- role="button" aria-expanded="false">{{ version }}
|
||||
- <span class="caret"></span></a>
|
||||
- <ul class="dropdown-menu" role="menu">
|
||||
- {% for v in versions.split(',') %}
|
||||
- <li><a href="https://fmt.dev/{{v}}">{{v}}</a></li>
|
||||
- {% endfor %}
|
||||
- </ul>
|
||||
- </li>
|
||||
{% for name in ['Contents', 'Usage', 'API', 'Syntax'] %}
|
||||
{% if pagename == name.lower() %}
|
||||
<li class="active"><a href="{{name.lower()}}.html">{{name}}
|
||||
@@ -74,23 +64,7 @@
|
||||
<div class="jumbotron">
|
||||
<div class="tb-container">
|
||||
<h1>{fmt}</h1>
|
||||
- <p class="lead">A modern formatting library</p>
|
||||
- <div class="btn-group" role="group">
|
||||
- {% set name = 'fmt' if version.split('.')[0]|int >= 3 else 'cppformat' %}
|
||||
- <a class="btn btn-success"
|
||||
- href="{{download_url}}/{{version}}/{{name}}-{{version}}.zip">
|
||||
- <span class="glyphicon glyphicon-download"></span> Download
|
||||
- </a>
|
||||
- <button type="button" class="btn btn-success dropdown-toggle"
|
||||
- data-toggle="dropdown"><span class="caret"></span></button>
|
||||
- <ul class="dropdown-menu">
|
||||
- {% for v in versions.split(',') %}
|
||||
- {% set name = 'fmt' if v.split('.')[0]|int >= 3 else 'cppformat' %}
|
||||
- <li><a href="{{download_url}}/{{v}}/{{name}}-{{v}}.zip">Version {{v}}
|
||||
- </a></li>
|
||||
- {% endfor %}
|
||||
- </ul>
|
||||
- </div>
|
||||
+ <p class="lead">Small, safe and fast formatting library for C++</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,30 +0,0 @@
|
||||
diff --git a/doc/build.py b/doc/build.py
|
||||
index 0943505b..59a7b498 100755
|
||||
--- a/doc/build.py
|
||||
+++ b/doc/build.py
|
||||
@@ -7,16 +7,6 @@ from subprocess import check_call, check_output, CalledProcessError, Popen, PIPE
|
||||
|
||||
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 create_build_env(dirname='virtualenv'):
|
||||
- # Create virtualenv.
|
||||
- if not os.path.exists(dirname):
|
||||
- check_call(['virtualenv', dirname])
|
||||
- import sysconfig
|
||||
- scripts_dir = os.path.basename(sysconfig.get_path('scripts'))
|
||||
- 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))
|
||||
-
|
||||
def build_docs(version='dev', **kwargs):
|
||||
doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__)))
|
||||
work_dir = kwargs.get('work_dir', '.')
|
||||
@@ -79,5 +69,4 @@ def build_docs(version='dev', **kwargs):
|
||||
return html_dir
|
||||
|
||||
if __name__ == '__main__':
|
||||
- create_build_env()
|
||||
build_docs(sys.argv[1])
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,55 +0,0 @@
|
||||
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
|
||||
|
@ -1,48 +0,0 @@
|
||||
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
|
||||
index 06848450..8e5e8a83 100644
|
||||
--- a/doc/CMakeLists.txt
|
||||
+++ b/doc/CMakeLists.txt
|
||||
@@ -5,10 +5,11 @@ if (NOT DOXYGEN)
|
||||
endif ()
|
||||
|
||||
find_package(PythonInterp QUIET REQUIRED)
|
||||
+find_program(SPHINX_EXECUTABLE NAMES sphinx-build sphinx-build-3)
|
||||
|
||||
add_custom_target(doc
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build.py
|
||||
- ${FMT_VERSION}
|
||||
+ ${SPHINX_EXECUTABLE} ${FMT_VERSION}
|
||||
SOURCES api.rst syntax.rst usage.rst build.py conf.py _templates/layout.html)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
diff --git a/doc/build.py b/doc/build.py
|
||||
index 59a7b498..8562d1bf 100755
|
||||
--- a/doc/build.py
|
||||
+++ b/doc/build.py
|
||||
@@ -7,7 +7,7 @@ from subprocess import check_call, check_output, CalledProcessError, Popen, PIPE
|
||||
|
||||
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 build_docs(version='dev', **kwargs):
|
||||
+def build_docs(sphinx_executable='sphinx-build', version='dev', **kwargs):
|
||||
doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__)))
|
||||
work_dir = kwargs.get('work_dir', '.')
|
||||
include_dir = kwargs.get(
|
||||
@@ -50,7 +50,7 @@ def build_docs(version='dev', **kwargs):
|
||||
raise CalledProcessError(p.returncode, cmd)
|
||||
html_dir = os.path.join(work_dir, 'html')
|
||||
main_versions = reversed(versions[-3:])
|
||||
- check_call(['sphinx-build',
|
||||
+ check_call([sphinx_executable,
|
||||
'-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir),
|
||||
'-Dversion=' + version, '-Drelease=' + version,
|
||||
'-Aversion=' + version, '-Aversions=' + ','.join(main_versions),
|
||||
@@ -69,4 +69,4 @@ def build_docs(version='dev', **kwargs):
|
||||
return html_dir
|
||||
|
||||
if __name__ == '__main__':
|
||||
- build_docs(sys.argv[1])
|
||||
+ build_docs(sys.argv[1], sys.argv[2])
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,20 +0,0 @@
|
||||
diff --git a/doc/index.rst b/doc/index.rst
|
||||
index 58f29295..ae14f8e0 100644
|
||||
--- a/doc/index.rst
|
||||
+++ b/doc/index.rst
|
||||
@@ -189,12 +189,3 @@ Ease of Use
|
||||
just three header files and no external dependencies.
|
||||
A permissive MIT `license <https://github.com/fmtlib/fmt#license>`_ allows
|
||||
using the library both in open-source and commercial projects.
|
||||
-
|
||||
-.. raw:: html
|
||||
-
|
||||
- <a class="btn btn-success" href="https://github.com/fmtlib/fmt">GitHub Repository</a>
|
||||
-
|
||||
- <div class="section footer">
|
||||
- <iframe src="http://ghbtns.com/github-btn.html?user=fmtlib&repo=fmt&type=watch&count=true"
|
||||
- class="github-btn" width="100" height="20"></iframe>
|
||||
- </div>
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1 +1 @@
|
||||
SHA512 (7.1.3.tar.gz) = cfb2431de822202f17a6f34a302b1922b9cd696d8d4c27ad50ea08add781d2af9944db987603c2eb294ee7d73054a60cc11d3a0693f7f6db61949f3041cb9517
|
||||
SHA512 (8.0.1.tar.gz) = 643e68d5b2e0e9c83231ab2b0036596a6297b1d9ed6bd7b1172bee4ff134c8af8f09174c06c94225132c1b635b0977ea4ce783748d7bd76a9a0b5ad597456c84
|
||||
|
Loading…
Reference in new issue