archrelease: copy trunk to testing-x86_64
[arch-packages.git] / fmt / trunk / fmt-no-pip-no-virtualenv.patch
blobc75c21255ecadc84b015406fbd06c9a9c940446a
1 diff '--color=auto' -rupN fmt.orig/doc/build.py fmt/doc/build.py
2 --- fmt.orig/doc/build.py 2022-11-06 10:33:24.090111201 +0100
3 +++ fmt/doc/build.py 2022-11-06 10:59:30.089304304 +0100
4 @@ -6,34 +6,6 @@ from subprocess import check_call, Calle
6 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', '8.0.0', '8.0.1', '8.1.0', '8.1.1', '9.0.0', '9.1.0']
8 -class Pip:
9 - def __init__(self, venv_dir):
10 - self.path = os.path.join(venv_dir, 'bin', 'pip')
12 - def install(self, package, commit=None):
13 - "Install package using pip."
14 - if commit:
15 - package = 'git+https://github.com/{0}.git@{1}'.format(package, commit)
16 - print('Installing {0}'.format(package))
17 - check_call([self.path, 'install', package])
19 -def create_build_env(venv_dir='virtualenv'):
20 - # Create virtualenv.
21 - if not os.path.exists(venv_dir):
22 - check_call(['python3', '-m', 'venv', venv_dir])
23 - # Install Sphinx and Breathe. Require the exact version of Sphinx which is
24 - # compatible with Breathe.
25 - pip = Pip(venv_dir)
26 - pip.install('wheel')
27 - pip.install('six')
28 - # See: https://github.com/sphinx-doc/sphinx/issues/9777
29 - pip.install('docutils==0.17.1')
30 - # Jinja2 >= 3.1 incompatible with sphinx 3.3.0
31 - # See: https://github.com/sphinx-doc/sphinx/issues/10291
32 - pip.install('Jinja2<3.1')
33 - pip.install('sphinx-doc/sphinx', 'v3.3.0')
34 - pip.install('michaeljones/breathe', 'v4.25.0')
36 def build_docs(version='dev', **kwargs):
37 doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__)))
38 work_dir = kwargs.get('work_dir', '.')
39 @@ -99,13 +71,14 @@ def build_docs(version='dev', **kwargs):
41 html_dir = os.path.join(work_dir, 'html')
42 main_versions = reversed(versions[-3:])
43 - check_call([os.path.join(work_dir, 'virtualenv', 'bin', 'sphinx-build'),
44 + check_call(['sphinx-build',
45 '-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir),
46 '-Dversion=' + version, '-Drelease=' + version,
47 '-Aversion=' + version, '-Aversions=' + ','.join(main_versions),
48 '-b', 'html', doc_dir, html_dir])
49 try:
50 - check_call(['lessc', '--verbose', '--clean-css',
51 + check_call(['npm', 'install', 'less', 'less-plugin-clean-css'])
52 + check_call(['npx', 'lessc', '--verbose', '--clean-css',
53 '--include-path=' + os.path.join(doc_dir, 'bootstrap'),
54 os.path.join(doc_dir, 'fmt.less'),
55 os.path.join(html_dir, '_static', 'fmt.css')])
56 @@ -118,5 +91,4 @@ def build_docs(version='dev', **kwargs):
57 return html_dir
59 if __name__ == '__main__':
60 - create_build_env()
61 build_docs(sys.argv[1])
62 diff '--color=auto' -rupN fmt.orig/.git/FETCH_HEAD fmt/.git/FETCH_HEAD
63 --- fmt.orig/.git/FETCH_HEAD 1970-01-01 01:00:00.000000000 +0100
64 +++ fmt/.git/FETCH_HEAD 2022-11-06 10:42:25.065548317 +0100
65 @@ -0,0 +1,3 @@
66 +fc07217d85e6dcec52878807d6bbd89a9d9156a5 branch 'master' of https://github.com/fmtlib/fmt
67 +3e8d2c57f3aee665e4672cd4e3fbf69cc2ebff2d not-for-merge branch '4.x' of https://github.com/fmtlib/fmt
68 +48f76dbb5211e9731b7f8aa19209ba86a1b8df23 not-for-merge branch 'text' of https://github.com/fmtlib/fmt