[arch-commits] Commit in python-recommonmark/repos (4 files)

Felix Yan felixonmars at archlinux.org
Mon Nov 9 14:57:11 UTC 2020


    Date: Monday, November 9, 2020 @ 14:57:11
  Author: felixonmars
Revision: 746956

archrelease: copy trunk to community-staging-any

Added:
  python-recommonmark/repos/community-staging-any/
  python-recommonmark/repos/community-staging-any/PKGBUILD
    (from rev 746955, python-recommonmark/trunk/PKGBUILD)
  python-recommonmark/repos/community-staging-any/recommonmark-disable-math-on-builds.patch
    (from rev 746955, python-recommonmark/trunk/recommonmark-disable-math-on-builds.patch)
  python-recommonmark/repos/community-staging-any/recommonmark-sphinx-2.patch
    (from rev 746955, python-recommonmark/trunk/recommonmark-sphinx-2.patch)

-------------------------------------------+
 PKGBUILD                                  |   56 ++++++++++++++++++++++++++
 recommonmark-disable-math-on-builds.patch |   59 ++++++++++++++++++++++++++++
 recommonmark-sphinx-2.patch               |   49 +++++++++++++++++++++++
 3 files changed, 164 insertions(+)

Copied: python-recommonmark/repos/community-staging-any/PKGBUILD (from rev 746955, python-recommonmark/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-11-09 14:57:11 UTC (rev 746956)
@@ -0,0 +1,56 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+pkgname=python-recommonmark
+pkgver=0.6.0.194.48f9d1a
+pkgrel=3
+_gitcommit=48f9d1a6848c77a104854f556c053f3ed3c2c354
+pkgdesc='Markdown parser for docutils'
+url='https://github.com/readthedocs/recommonmark'
+arch=('any')
+license=('MIT')
+depends=('python-docutils' 'python-commonmark' 'python-setuptools' 'python-sphinx')
+makedepends=('git')
+checkdepends=('python-pytest')
+source=(${pkgname}::"git+https://github.com/readthedocs/recommonmark#commit=$_gitcommit"
+        recommonmark-disable-math-on-builds.patch
+        recommonmark-sphinx-2.patch)
+sha512sums=('SKIP'
+            '66ef07ac21643b913c8ee551c7c71753fcb6442712e4fb11b84ea5f34265715471759b2c5a1badc1e299ca6aa831713b12284144801616349b2db61738607e8a'
+            '317b7139819bb183184e0a5abf4f74b955746779c841cf3b9e7e8032cc23ac3ce5f54a1ebd2d4c012038041c58ab849a09271d806f9fc3c5c0dadd1ad92eddae')
+
+pkgver() {
+  cd ${pkgbase}
+  printf "%s.%s.%s" \
+    "$(PYTHONPATH=. python -c 'print(__import__('"'recommonmark'"').__version__)')" \
+    "$(git rev-list --count HEAD)" \
+    "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+  patch -d ${pkgbase} -p1 < "${srcdir}/recommonmark-disable-math-on-builds.patch"
+  patch -d ${pkgbase} -p1 < "${srcdir}/recommonmark-sphinx-2.patch" # Fix tests with Sphinx 2
+}
+
+build() {
+  echo "Building python..."
+  cd ${pkgbase}
+  python setup.py build
+  make -j1 -C docs text man SPHINXBUILD=sphinx-build
+}
+
+check() {
+  echo "Checking python..."
+  cd ${pkgbase}
+  py.test
+}
+
+package() {
+  cd ${pkgbase}
+  python setup.py install --root="${pkgdir}" --skip-build -O1
+  install -Dm 644 license.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 README.md CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 docs/_build/text/*.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 docs/_build/man/recommonmark.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+}
+
+# vim: ts=2 sw=2 et:

Copied: python-recommonmark/repos/community-staging-any/recommonmark-disable-math-on-builds.patch (from rev 746955, python-recommonmark/trunk/recommonmark-disable-math-on-builds.patch)
===================================================================
--- community-staging-any/recommonmark-disable-math-on-builds.patch	                        (rev 0)
+++ community-staging-any/recommonmark-disable-math-on-builds.patch	2020-11-09 14:57:11 UTC (rev 746956)
@@ -0,0 +1,59 @@
+From 5a14811519a219b88c96b5b9bc3103ce5d758dc4 Mon Sep 17 00:00:00 2001
+From: Eric Holscher <eric at ericholscher.com>
+Date: Fri, 9 Aug 2019 11:37:09 -0700
+Subject: [PATCH] Disable math on builds to fix doc building
+
+---
+ docs/auto_structify.md | 6 ++++++
+ docs/conf.py           | 2 ++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/docs/auto_structify.md b/docs/auto_structify.md
+index 52eba2e..c4d58e5 100644
+--- a/docs/auto_structify.md
++++ b/docs/auto_structify.md
+@@ -134,6 +134,8 @@ def function():
+ ### Math Formula
+ You can normally write latex math formula with `math` codeblock. See also [Inline Math](#inline-math).
+ 
++**Warning**: Math is currently broken on some Sphinx builds
++
+ Example
+ 
+ ````
+@@ -149,6 +151,7 @@ E = m c^2
+ ```
+ 
+ ### Embed reStructuredText
++
+ Recommonmark also allows embedding reStructuredText syntax in the codeblocks.
+ There are two styles for embedding reStructuredText. The first is enabled by `eval_rst` codeblock. The content of codeblock will be parsed as reStructuredText and insert into the document. This can be used to quickly introduce some of reStructuredText command that not yet available in markdown. For example,
+ 
+@@ -243,11 +246,14 @@ The `<div style="clear: right;"></div>` line clears the sidebar for the next tit
+ 
+ Inline Math
+ -----------
++
+ Besides the [Math Formula](#math-formula), you can also write latex math in inline codeblock text. You can do so by inserting `$`
+ in the beginning and end of inline codeblock.
+ 
+ Example
+ 
++**Warning**: Math is currently broken on some Sphinx builds
++
+ ```
+ This formula `$ y=\sum_{i=1}^n g(x_i) $`
+ ```
+diff --git a/docs/conf.py b/docs/conf.py
+index 5c2f8c1..a67cc99 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -295,6 +295,8 @@ def setup(app):
+     app.add_config_value('recommonmark_config', {
+         #'url_resolver': lambda url: github_doc_root + url,
+         'auto_toc_tree_section': 'Contents',
++        'enable_math': False,
++        'enable_inline_math': False,
+         'enable_eval_rst': True,
+         'enable_auto_doc_ref': True,
+     }, True)

Copied: python-recommonmark/repos/community-staging-any/recommonmark-sphinx-2.patch (from rev 746955, python-recommonmark/trunk/recommonmark-sphinx-2.patch)
===================================================================
--- community-staging-any/recommonmark-sphinx-2.patch	                        (rev 0)
+++ community-staging-any/recommonmark-sphinx-2.patch	2020-11-09 14:57:11 UTC (rev 746956)
@@ -0,0 +1,49 @@
+diff --git a/tests/test_sphinx.py b/tests/test_sphinx.py
+index 06078b1..201f27b 100644
+--- a/tests/test_sphinx.py
++++ b/tests/test_sphinx.py
+@@ -142,17 +142,17 @@ class GenericTests(SphinxIntegrationTests):
+         output = self.read_file('index.html')
+         self.assertIn(
+             ('<ul class="simple">\n'
+-             '<li>Item A</li>\n'
+-             '<li>Item B</li>\n'
+-             '<li>Item C</li>\n'
++             '<li><p>Item A</p></li>\n'
++             '<li><p>Item B</p></li>\n'
++             '<li><p>Item C</p></li>\n'
+              '</ul>'),
+             output
+         )
+         self.assertIn(
+             ('<ol class="simple">\n'
+-             '<li>Item 1</li>\n'
+-             '<li>Item 2</li>\n'
+-             '<li>Item 3</li>\n'
++             '<li><p>Item 1</p></li>\n'
++             '<li><p>Item 2</p></li>\n'
++             '<li><p>Item 3</p></li>\n'
+              '</ol>'),
+             output
+         )
+@@ -207,16 +207,16 @@ class CustomExtensionTests(SphinxIntegrationTests):
+     def test_integration(self):
+         output = self.read_file('index.html')
+         self.assertIn('<table ', output)
+-        self.assertIn('<th class="head">abc</th>', output)
+-        self.assertIn('<th class="head">data</th>', output)
++        self.assertIn('<th class="head"><p>abc</p></th>', output)
++        self.assertIn('<th class="head"><p>data</p></th>', output)
+         self.assertIn('</table>', output)
+ 
+         self.assertIn(
+             ('<div class="contents topic" id="contents">\n'
+              '<p class="topic-title first">Contents</p>\n'
+              '<ul class="simple">\n'
+-             '<li><a class="reference internal" href="#header" id="id1">Header</a><ul>\n'
+-             '<li><a class="reference internal" href="#header-2" id="id2">Header 2</a></li>\n'
++             '<li><p><a class="reference internal" href="#header" id="id1">Header</a></p>\n<ul>\n'
++             '<li><p><a class="reference internal" href="#header-2" id="id2">Header 2</a></p></li>\n'
+              '</ul>\n</li>\n</ul>'),
+             output
+             )



More information about the arch-commits mailing list