Updated to version 8.0.1.

This commit is contained in:
Vitaly Zaitsev 2021-07-04 16:14:18 +02:00
parent fc812efdd4
commit 56e55afdaa
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A
9 changed files with 10 additions and 288 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@
/7.0.3.tar.gz
/7.1.2.tar.gz
/7.1.3.tar.gz
/8.0.1.tar.gz

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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&amp;repo=fmt&amp;type=watch&amp;count=true"
- class="github-btn" width="100" height="20"></iframe>
- </div>
--
2.28.0

View File

@ -1,21 +1,13 @@
%undefine __cmake_in_source_build
%bcond_with doc
Name: fmt
Version: 7.1.3
Release: 3%{?dist}
Summary: Small, safe and fast formatting library for C++
Version: 8.0.1
Release: 1%{?dist}
License: BSD
Summary: Small, safe and fast formatting library for C++
URL: https://github.com/fmtlib/%{name}
Source0: %{url}/archive/%{version}.tar.gz
# See https://github.com/fmtlib/fmt/issues/443 and https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/LVKYLDLJVWAVJE4MQVKDO6PYZRD5MCP6/
Patch1: doc-build-removed-all-pip-internet-stuff.patch
Patch3: doc-build-do-not-create-virtual-environment.patch
Patch4: doc-_templates-layout-stripped-Google-Analytics.patch
Patch5: doc-_templates-layout-stripped-download-links.patch
Patch6: doc-index-removed-GitHub-iframe.patch
Patch7: doc-build-use-sphinx-build-3.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@ -25,20 +17,6 @@ BuildRequires: cmake3
%else
BuildRequires: cmake
%endif
%if %{with doc}
BuildRequires: doxygen
BuildRequires: nodejs-less
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: python%{python3_version_nodots}-sphinx
BuildRequires: python%{python3_version_nodots}-breathe
%else
BuildRequires: python3-sphinx
BuildRequires: python3-breathe
%endif
%else
Provides: %{name}-doc = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: %{name}-doc < %{?epoch:%{epoch}:}%{version}-%{release}
%endif
# This package replaces the old name of cppformat
Provides: cppformat = %{?epoch:%{epoch}:}%{version}-%{release}
@ -59,28 +37,9 @@ Obsoletes: cppformat-devel < %{?epoch:%{epoch}:}%{version}-%{release}
%description devel
This package contains the header file for using %{name}.
%if %{with doc}
%package doc
Summary: Documentation files for %{name}
License: Python
BuildArch: noarch
# This package replaces the old name of cppformat
Provides: cppformat-doc = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: cppformat-doc < %{?epoch:%{epoch}:}%{version}-%{release}
%description doc
This package contains documentation for developer documentation for %{name}.
%endif
%prep
%autosetup -p1
%if %{with doc}
# Remove --clean-css since that plugin isn't available
sed -i "s/'--clean-css',//" doc/build.py
%endif
%build
%if 0%{?rhel} && 0%{?rhel} <= 7
%cmake3 \
@ -92,17 +51,7 @@ sed -i "s/'--clean-css',//" doc/build.py
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DFMT_CMAKE_DIR=%{_libdir}/cmake/%{name} \
-DFMT_LIB_DIR=%{_libdir}
%cmake_build \
%if %{with doc}
--target doc \
%endif
--target all
%if %{with doc}
# Remove temporary build products
rm -rf %{_vpath_builddir}/doc/html/{.buildinfo,.doctrees,objects.inv}
%endif
%cmake_build
%install
%cmake_install
@ -113,7 +62,7 @@ rm -rf %{_vpath_builddir}/doc/html/{.buildinfo,.doctrees,objects.inv}
%files
%license LICENSE.rst
%doc ChangeLog.rst README.rst
%{_libdir}/lib%{name}.so.7*
%{_libdir}/lib%{name}.so.8*
%files devel
%{_includedir}/%{name}
@ -121,13 +70,10 @@ rm -rf %{_vpath_builddir}/doc/html/{.buildinfo,.doctrees,objects.inv}
%{_libdir}/cmake/%{name}
%{_libdir}/pkgconfig/%{name}.pc
%if %{with doc}
%files doc
%doc %{_datadir}/doc/%{name}
%license doc/python-license.txt
%endif
%changelog
* Sun Jul 04 2021 Vitaly Zaitsev <vitaly@easycoding.org> - 8.0.1-1
- Updated to version 8.0.1.
* Mon May 03 2021 Vitaly Zaitsev <vitaly@easycoding.org> - 7.1.3-3
- Fixed RHBZ#1956521.

View File

@ -1 +1 @@
SHA512 (7.1.3.tar.gz) = cfb2431de822202f17a6f34a302b1922b9cd696d8d4c27ad50ea08add781d2af9944db987603c2eb294ee7d73054a60cc11d3a0693f7f6db61949f3041cb9517
SHA512 (8.0.1.tar.gz) = 643e68d5b2e0e9c83231ab2b0036596a6297b1d9ed6bd7b1172bee4ff134c8af8f09174c06c94225132c1b635b0977ea4ce783748d7bd76a9a0b5ad597456c84