[arch-commits] Commit in python-recommonmark/trunk (3 files)

Caleb Maclennan alerque at gemini.archlinux.org
Wed Sep 8 09:24:37 UTC 2021


    Date: Wednesday, September 8, 2021 @ 09:24:36
  Author: alerque
Revision: 1012621

upgpkg: python-recommonmark 0.7.1-1; adopt & overhaul, use sdist, drop obsolete patches

Modified:
  python-recommonmark/trunk/PKGBUILD
Deleted:
  python-recommonmark/trunk/recommonmark-disable-math-on-builds.patch
  python-recommonmark/trunk/recommonmark-sphinx-2.patch

-------------------------------------------+
 PKGBUILD                                  |   76 +++++++++++-----------------
 recommonmark-disable-math-on-builds.patch |   59 ---------------------
 recommonmark-sphinx-2.patch               |   49 ------------------
 3 files changed, 31 insertions(+), 153 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-09-08 09:13:30 UTC (rev 1012620)
+++ PKGBUILD	2021-09-08 09:24:36 UTC (rev 1012621)
@@ -1,56 +1,42 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
 
-pkgname=python-recommonmark
-pkgver=0.6.0.194.48f9d1a
-pkgrel=3
-_gitcommit=48f9d1a6848c77a104854f556c053f3ed3c2c354
+_pyname=recommonmark
+pkgname=python-$_pyname
+pkgver=0.7.1
+pkgrel=1
 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')
+url="https://$_pyname.readthedocs.io/"
+arch=(any)
+license=(MIT)
+_pydeps=(commonmark
+         docutils
+         sphinx)
+depends=(python
+         "${_pydeps[@]/#/python-}")
+makedepends=(python-setuptools)
+checkdepends=(python-pytest)
+_archive="$_pyname-$pkgver"
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/$_pyname/$_archive.tar.gz")
+sha256sums=('bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67')
 
-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
+	cd "$_archive"
+	python setup.py build
+	make -C docs text man
 }
 
 check() {
-  echo "Checking python..."
-  cd ${pkgbase}
-  py.test
+	cd "$_archive"
+	pytest \
+		--deselect tests/test_sphinx.py
 }
 
 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"
+	cd "$_archive"
+	python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" license.md
+	install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md CHANGELOG.md
+	install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" docs/_build/text/*.txt
+	install -Dm0644 -t "$pkgdir/usr/share/man/man1/" "docs/_build/man/$_pyname.1"
 }
-
-# vim: ts=2 sw=2 et:

Deleted: recommonmark-disable-math-on-builds.patch
===================================================================
--- recommonmark-disable-math-on-builds.patch	2021-09-08 09:13:30 UTC (rev 1012620)
+++ recommonmark-disable-math-on-builds.patch	2021-09-08 09:24:36 UTC (rev 1012621)
@@ -1,59 +0,0 @@
-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)

Deleted: recommonmark-sphinx-2.patch
===================================================================
--- recommonmark-sphinx-2.patch	2021-09-08 09:13:30 UTC (rev 1012620)
+++ recommonmark-sphinx-2.patch	2021-09-08 09:24:36 UTC (rev 1012621)
@@ -1,49 +0,0 @@
-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