[arch-commits] Commit in python-commonmark/repos (3 files)

Evangelos Foutras foutrelis at archlinux.org
Sat Oct 26 05:19:35 UTC 2019


    Date: Saturday, October 26, 2019 @ 05:19:35
  Author: foutrelis
Revision: 520091

archrelease: copy trunk to community-staging-any

Added:
  python-commonmark/repos/community-staging-any/
  python-commonmark/repos/community-staging-any/PKGBUILD
    (from rev 520090, python-commonmark/trunk/PKGBUILD)
  python-commonmark/repos/community-staging-any/python-3.8.patch
    (from rev 520090, python-commonmark/trunk/python-3.8.patch)

------------------+
 PKGBUILD         |   78 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 python-3.8.patch |   41 +++++++++++++++++++++++++++
 2 files changed, 119 insertions(+)

Copied: python-commonmark/repos/community-staging-any/PKGBUILD (from rev 520090, python-commonmark/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2019-10-26 05:19:35 UTC (rev 520091)
@@ -0,0 +1,78 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+pkgbase=python-commonmark
+pkgname=('python-commonmark' 'python2-commonmark')
+pkgver=0.8.0
+pkgrel=2
+pkgdesc='Python parser for the CommonMark Markdown spec'
+url='https://pypi.org/project/commonmark/'
+arch=('any')
+license=('BSD')
+makedepends=('python-setuptools' 'python-docutils' 'python-future' 'python-sphinx'
+             'python2-setuptools' 'python2-docutils' 'python2-future' 'python2-sphinx'
+             'python-sphinx_rtd_theme' 'python2-sphinx_rtd_theme')
+checkdepends=('python-hypothesis' 'python2-hypothesis')
+options=('!makeflags')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/readthedocs/commonmark.py/archive/${pkgver}.tar.gz
+        python-3.8.patch)
+sha256sums=('b52fe76749ad856cd52be67e35b548143e7d49d02faef288cf0abf2ee59dabec'
+            'f5cd2dc52eee3a6d856b615910d85d031b6c9f5f7e80e28479d589d46a289a5e')
+sha512sums=('fcb70913ec2a8693fc667e18c1600a90d6fa26d9516a9cffd2a3d7a7c2bce2167d65d2ecd0940b4d8933b833f1ed6620bc59fd7bc2ae198365043119dced9da3'
+            '82a839293cc8e3ac1394f091f7441f0320e3ea9414edb40f6f794947b360a379743d767b24e02284f8e7eb3a0635fa9179945242e7aa2f2e18bdffde80e160ee')
+
+prepare() {
+  cp -r commonmark.py-${pkgver}{,-py2}
+
+  patch -Np1 -d commonmark.py-${pkgver} <python-3.8.patch
+}
+
+build() {
+  (cd commonmark.py-${pkgver}
+    python setup.py build
+    make -C docs man text SPHINXBUILD=sphinx-build
+  )
+  (cd commonmark.py-${pkgver}-py2
+    python2 setup.py build
+    make -C docs man text SPHINXBUILD=sphinx-build2
+  )
+}
+
+check() {
+  (cd commonmark.py-${pkgver}
+    export PYTHONPATH=.
+    python CommonMark/tests/unit_tests.py
+    python setup.py test
+  )
+  (cd commonmark.py-${pkgver}-py2
+    export PYTHONPATH=.
+    export PYTHONIOENCODING=UTF-8
+    python2 CommonMark/tests/unit_tests.py
+    python2 setup.py test
+  )
+}
+
+package_python-commonmark() {
+  depends=('python-docutils' 'python-future')
+
+  cd commonmark.py-${pkgver}
+  python setup.py install --root="${pkgdir}" -O1 --skip-build
+  install -Dm 644 README.rst CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 docs/_build/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 docs/_build/man/commonmark-py.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+  mv "${pkgdir}/usr/bin/cmark"{,-py3}
+}
+
+package_python2-commonmark() {
+  depends=('python2-docutils' 'python2-future')
+
+  cd commonmark.py-${pkgver}-py2
+  python2 setup.py install --root="${pkgdir}" -O1 --skip-build
+  install -Dm 644 README.rst CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 docs/_build/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 docs/_build/man/commonmark-py.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+  mv "${pkgdir}/usr/bin/cmark"{,-py2}
+}
+
+# vim: ts=2 sw=2 et:

Copied: python-commonmark/repos/community-staging-any/python-3.8.patch (from rev 520090, python-commonmark/trunk/python-3.8.patch)
===================================================================
--- community-staging-any/python-3.8.patch	                        (rev 0)
+++ community-staging-any/python-3.8.patch	2019-10-26 05:19:35 UTC (rev 520091)
@@ -0,0 +1,41 @@
+From cc242c43642a5249cd8aedd6c52dad257b95ab4b Mon Sep 17 00:00:00 2001
+From: Axel Haustant <noirbizarre at gmail.com>
+Date: Mon, 4 Mar 2019 13:00:34 +0100
+Subject: [PATCH] Use timeit.default_counter() instead of time.clock()
+ (deprecated on Python 3.3+)
+
+---
+ commonmark/tests/run_spec_tests.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/commonmark/tests/run_spec_tests.py b/commonmark/tests/run_spec_tests.py
+index 346e46f..7091ab3 100755
+--- a/commonmark/tests/run_spec_tests.py
++++ b/commonmark/tests/run_spec_tests.py
+@@ -2,7 +2,7 @@
+ # coding: utf-8
+ from __future__ import division, print_function, unicode_literals
+ import re
+-import time
++import timeit
+ import codecs
+ import argparse
+ import sys
+@@ -124,7 +124,7 @@ def showSpaces(t):
+ 
+     current_section = ""
+ 
+-    startTime = time.clock()
++    startTime = timeit.default_timer()
+ 
+     if args.i:
+         print(
+@@ -223,7 +223,7 @@ def showSpaces(t):
+ 
+     print('\n' + str(passed) + ' tests passed, ' + str(failed) + ' failed')
+ 
+-    endTime = time.clock()
++    endTime = timeit.default_timer()
+     runTime = endTime - startTime
+ 
+     if args.s:



More information about the arch-commits mailing list