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

Eli Schwartz eschwartz at archlinux.org
Mon Jul 16 14:55:33 UTC 2018


    Date: Monday, July 16, 2018 @ 14:55:33
  Author: eschwartz
Revision: 359860

archrelease: copy trunk to community-staging-any

Added:
  python-recommonmark/repos/community-staging-any/
  python-recommonmark/repos/community-staging-any/PKGBUILD
    (from rev 359859, python-recommonmark/trunk/PKGBUILD)
  python-recommonmark/repos/community-staging-any/recommonmark-fix-mdnode-parent.patch
    (from rev 359859, python-recommonmark/trunk/recommonmark-fix-mdnode-parent.patch)
  python-recommonmark/repos/community-staging-any/recommonmark-sphinx-refdomain-fix.patch
    (from rev 359859, python-recommonmark/trunk/recommonmark-sphinx-refdomain-fix.patch)

-----------------------------------------+
 PKGBUILD                                |   86 ++++++++++++++++++++++++++++++
 recommonmark-fix-mdnode-parent.patch    |   25 ++++++++
 recommonmark-sphinx-refdomain-fix.patch |   72 +++++++++++++++++++++++++
 3 files changed, 183 insertions(+)

Copied: python-recommonmark/repos/community-staging-any/PKGBUILD (from rev 359859, python-recommonmark/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2018-07-16 14:55:33 UTC (rev 359860)
@@ -0,0 +1,86 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+pkgbase=python-recommonmark
+pkgname=('python-recommonmark' 'python2-recommonmark')
+pkgver=0.4.0.133.c410abb
+pkgrel=4
+_gitcommit=c410abb565a3c4ad4de0ce204ab2fa2db8031cf1
+pkgdesc='Markdown parser for docutils'
+url='https://github.com/rtfd/recommonmark'
+arch=('any')
+license=('MIT')
+makedepends=('git'
+             'python-setuptools' 'python-commonmark' 'python-docutils' 'python-sphinx'
+             'python2-setuptools' 'python2-commonmark' 'python2-docutils' 'python2-sphinx')
+checkdepends=('python-pytest' 'python2-pytest')
+source=(${pkgbase}::"git+https://github.com/rtfd/recommonmark#commit=$_gitcommit"
+        recommonmark-sphinx-refdomain-fix.patch
+        recommonmark-fix-mdnode-parent.patch)
+sha512sums=('SKIP'
+            'df2440e7ce927ca6adc31e07f9e375fa4643bbe1c33a34821d3d3e5d9d4b2ae8bbdf7412a8f2c64d343c9004f54a4a650fc59e461b3b1eb1ab11c1dec02422fd'
+            '89745108ad78349ace30582cb28f8693edc109c97e94182a37afe5219bec8988bb785d77594e34306facf0eaa4e640c0bdf4e53249d6154094222e58df9498e9')
+
+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-sphinx-refdomain-fix.patch"
+  patch -d ${pkgbase} -p1 < "${srcdir}/recommonmark-fix-mdnode-parent.patch"
+  cp -a ${pkgbase}{,-py2}
+  for tool in cm2{html,latex,man,pseudoxml,xetex,xml}; do
+    sed -r "s|(${tool}) |\12 |g" -i ${pkgbase}-py2/setup.py
+  done
+}
+
+build() {
+  msg2 "Building python..."
+  (cd ${pkgbase}
+    python setup.py build
+    make -j1 -C docs text man SPHINXBUILD=sphinx-build
+  )
+  msg2 "Building python2..."
+  (cd ${pkgbase}-py2
+    python2 setup.py build
+    make -j1 -C docs text man SPHINXBUILD=sphinx-build2
+  )
+}
+
+check() {
+  msg2 "Checking python..."
+  (cd ${pkgbase}
+    py.test
+  )
+  msg2 "Checking python2..."
+  (cd ${pkgbase}-py2
+    py.test2
+  )
+}
+
+package_python-recommonmark() {
+  depends=('python-docutils' 'python-commonmark' 'python-setuptools' 'python-sphinx')
+
+  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"
+}
+
+package_python2-recommonmark() {
+  depends=('python2-docutils' 'python2-commonmark' 'python2-setuptools' 'python2-sphinx')
+
+  cd ${pkgbase}-py2
+  python2 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-fix-mdnode-parent.patch (from rev 359859, python-recommonmark/trunk/recommonmark-fix-mdnode-parent.patch)
===================================================================
--- community-staging-any/recommonmark-fix-mdnode-parent.patch	                        (rev 0)
+++ community-staging-any/recommonmark-fix-mdnode-parent.patch	2018-07-16 14:55:33 UTC (rev 359860)
@@ -0,0 +1,25 @@
+From c38a2fe8c0427d74edf94627d3bc4bf43306d385 Mon Sep 17 00:00:00 2001
+From: anthraxx <levente at leventepolyak.net>
+Date: Mon, 11 Sep 2017 23:25:14 +0200
+Subject: [PATCH] guard mdnode.parent.sourcepos if not existent
+
+---
+ recommonmark/parser.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/recommonmark/parser.py b/recommonmark/parser.py
+index e54fdf4..f651467 100644
+--- a/recommonmark/parser.py
++++ b/recommonmark/parser.py
+@@ -131,7 +131,7 @@ class CommonMarkParser(parsers.Parser):
+         # these mdnodes won't have sourcepos on them for whatever reason. This
+         # is better than 0 though.
+         ref_node.line = (mdnode.sourcepos[0][0] if mdnode.sourcepos
+-                         else mdnode.parent.sourcepos[0][0])
++                         else mdnode.parent.sourcepos[0][0] if mdnode.parent.sourcepos else 0)
+         if mdnode.title:
+             ref_node['title'] = mdnode.title
+         next_node = ref_node
+-- 
+2.14.1
+

Copied: python-recommonmark/repos/community-staging-any/recommonmark-sphinx-refdomain-fix.patch (from rev 359859, python-recommonmark/trunk/recommonmark-sphinx-refdomain-fix.patch)
===================================================================
--- community-staging-any/recommonmark-sphinx-refdomain-fix.patch	                        (rev 0)
+++ community-staging-any/recommonmark-sphinx-refdomain-fix.patch	2018-07-16 14:55:33 UTC (rev 359860)
@@ -0,0 +1,72 @@
+From 90d07fbe8fccaeb0da0ed7708e4c2a89f33c2426 Mon Sep 17 00:00:00 2001
+From: anthraxx <levente at leventepolyak.net>
+Date: Mon, 7 Aug 2017 15:50:41 +0200
+Subject: [PATCH] fix for modern sphinx require refdomain
+
+---
+ recommonmark/parser.py |  1 +
+ tests/test_basic.py    | 10 +++++-----
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/recommonmark/parser.py b/recommonmark/parser.py
+index e54fdf4..c3c27ac 100644
+--- a/recommonmark/parser.py
++++ b/recommonmark/parser.py
+@@ -141,6 +141,7 @@ class CommonMarkParser(parsers.Parser):
+             wrap_node = addnodes.pending_xref(
+                 reftarget=mdnode.destination,
+                 reftype='any',
++                refdomain='',
+                 refexplicit=True,
+                 refwarn=True
+             )
+diff --git a/tests/test_basic.py b/tests/test_basic.py
+index 0e703dc..ca1a08c 100644
+--- a/tests/test_basic.py
++++ b/tests/test_basic.py
+@@ -183,7 +183,7 @@ class TestParsing(unittest.TestCase):
+             <?xml version="1.0" ?>
+             <document source="<string>">
+               <paragraph>
+-                <pending_xref refexplicit="True" reftarget="/foo" reftype="any" refwarn="True">
++                <pending_xref refdomain="" refexplicit="True" reftarget="/foo" reftype="any" refwarn="True">
+                   <reference refuri="/foo">link</reference>
+                 </pending_xref>
+               </paragraph>
+@@ -198,7 +198,7 @@ class TestParsing(unittest.TestCase):
+             <?xml version="1.0" ?>
+             <document source="<string>">
+               <paragraph>
+-                <pending_xref refexplicit="True" reftarget="foo" reftype="any" refwarn="True">
++                <pending_xref refdomain="" refexplicit="True" reftarget="foo" reftype="any" refwarn="True">
+                   <reference refuri="foo">link</reference>
+                 </pending_xref>
+               </paragraph>
+@@ -274,21 +274,21 @@ class TestParsing(unittest.TestCase):
+               <bullet_list>
+                 <list_item>
+                   <paragraph>
+-                    <pending_xref refexplicit="True" reftarget="/1" reftype="any" refwarn="True">
++                    <pending_xref refdomain="" refexplicit="True" reftarget="/1" reftype="any" refwarn="True">
+                       <reference refuri="/1">List item 1</reference>
+                     </pending_xref>
+                   </paragraph>
+                 </list_item>
+                 <list_item>
+                   <paragraph>
+-                    <pending_xref refexplicit="True" reftarget="/2" reftype="any" refwarn="True">
++                    <pending_xref refdomain="" refexplicit="True" reftarget="/2" reftype="any" refwarn="True">
+                       <reference refuri="/2">List item 2</reference>
+                     </pending_xref>
+                   </paragraph>
+                 </list_item>
+                 <list_item>
+                   <paragraph>
+-                    <pending_xref refexplicit="True" reftarget="/3" reftype="any" refwarn="True">
++                    <pending_xref refdomain="" refexplicit="True" reftarget="/3" reftype="any" refwarn="True">
+                       <reference refuri="/3">List item 3</reference>
+                     </pending_xref>
+                   </paragraph>
+-- 
+2.13.3
+



More information about the arch-commits mailing list