[arch-commits] Commit in m2r/repos/community-any (5 files)

Antonio Rojas arojas at gemini.archlinux.org
Sun Jul 31 18:56:17 UTC 2022


    Date: Sunday, July 31, 2022 @ 18:56:17
  Author: arojas
Revision: 1259467

archrelease: copy trunk to community-any

Added:
  m2r/repos/community-any/PKGBUILD
    (from rev 1259466, m2r/trunk/PKGBUILD)
  m2r/repos/community-any/docutils-0.19.patch
    (from rev 1259466, m2r/trunk/docutils-0.19.patch)
  m2r/repos/community-any/python310.patch
    (from rev 1259466, m2r/trunk/python310.patch)
Deleted:
  m2r/repos/community-any/PKGBUILD
  m2r/repos/community-any/python310.patch

---------------------+
 PKGBUILD            |   81 ++++++++++++++++++++-------------------
 docutils-0.19.patch |  103 ++++++++++++++++++++++++++++++++++++++++++++++++++
 python310.patch     |   26 ++++++------
 3 files changed, 158 insertions(+), 52 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-07-31 18:56:05 UTC (rev 1259466)
+++ PKGBUILD	2022-07-31 18:56:17 UTC (rev 1259467)
@@ -1,39 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgname=m2r
-pkgver=0.2.1
-pkgrel=10
-pkgdesc="Markdown to reStructuredText converter"
-arch=('any')
-url="https://github.com/miyakogi/m2r"
-license=('MIT')
-depends=('python-mistune1' 'python-docutils')
-makedepends=('python-setuptools')
-checkdepends=('python-pygments' 'python-pytest-runner')
-source=("https://github.com/miyakogi/m2r/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
-        python310.patch)
-sha512sums=('847f04538ee52f0b0a88cee9474ed889e8114a3a7b1fb221cdaa867ab70ca52f517250f2c8bbf795ae598c7b6614e6d03d9f6f05b7e3d56fb8087d63eb52f1bc'
-            '3eeba63f27c0a4441948bfe3d55cf1db82ecc136a2ceafc054e68920f1da394df79d76c3fa8216effa516d1653f2bfda9f2f980cdca96d3f38468d18818c8bc1')
-
-prepare() {
-  cd m2r-$pkgver
-  patch -Np1 -i ../python310.patch
-}
-
-build() {
-  cd m2r-$pkgver
-  python setup.py build
-}
-
-check() {
-  cd m2r-$pkgver
-  python setup.py pytest
-}
-
-package() {
-  cd m2r-$pkgver
-  python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
-  install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
-}
-
-# vim:set ts=2 sw=2 et:

Copied: m2r/repos/community-any/PKGBUILD (from rev 1259466, m2r/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-07-31 18:56:17 UTC (rev 1259467)
@@ -0,0 +1,42 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=m2r
+pkgver=0.2.1
+pkgrel=11
+pkgdesc="Markdown to reStructuredText converter"
+arch=('any')
+url="https://github.com/miyakogi/m2r"
+license=('MIT')
+depends=('python-mistune1' 'python-docutils')
+makedepends=('python-setuptools')
+checkdepends=('python-pygments' 'python-pytest-runner')
+source=("https://github.com/miyakogi/m2r/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
+        python310.patch
+        docutils-0.19.patch)
+sha512sums=('847f04538ee52f0b0a88cee9474ed889e8114a3a7b1fb221cdaa867ab70ca52f517250f2c8bbf795ae598c7b6614e6d03d9f6f05b7e3d56fb8087d63eb52f1bc'
+            '3eeba63f27c0a4441948bfe3d55cf1db82ecc136a2ceafc054e68920f1da394df79d76c3fa8216effa516d1653f2bfda9f2f980cdca96d3f38468d18818c8bc1'
+            '9e6398fedb9ee4a9274b5e78222466696da51411bf80709f59220bb37d4fedd9a87f03106771409c295522a8a3ca1126c51e104a0b530b346950a435776b4f64')
+
+prepare() {
+  cd m2r-$pkgver
+  patch -Np1 -i ../python310.patch
+  patch -p1 -i ../docutils-0.19.patch
+}
+
+build() {
+  cd m2r-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd m2r-$pkgver
+  python setup.py pytest
+}
+
+package() {
+  cd m2r-$pkgver
+  python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
+  install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}
+
+# vim:set ts=2 sw=2 et:

Copied: m2r/repos/community-any/docutils-0.19.patch (from rev 1259466, m2r/trunk/docutils-0.19.patch)
===================================================================
--- docutils-0.19.patch	                        (rev 0)
+++ docutils-0.19.patch	2022-07-31 18:56:17 UTC (rev 1259467)
@@ -0,0 +1,103 @@
+diff --git a/m2r.py b/m2r.py
+index a4e43c2..6c1e6e0 100644
+--- a/m2r.py
++++ b/m2r.py
+@@ -5,21 +5,13 @@
+ import os
+ import os.path
+ import re
+-import sys
+ from argparse import ArgumentParser, Namespace
+ 
+ from docutils import statemachine, nodes, io, utils
+ from docutils.parsers import rst
+-from docutils.core import ErrorString
+-from docutils.utils import SafeString, column_width
++from docutils.utils import column_width
+ import mistune
+-
+-if sys.version_info < (3, ):
+-    from codecs import open as _open
+-    from urlparse import urlparse
+-else:
+-    _open = open
+-    from urllib.parse import urlparse
++from urllib.parse import urlparse
+ 
+ __version__ = '0.2.1'
+ _is_sphinx = False
+@@ -609,10 +601,10 @@ def run(self):
+             raise self.severe('Problems with "%s" directive path:\n'
+                               'Cannot encode input file path "%s" '
+                               '(wrong locale?).' %
+-                              (self.name, SafeString(path)))
++                              (self.name, path))
+         except IOError as error:
+             raise self.severe('Problems with "%s" directive path:\n%s.' %
+-                              (self.name, ErrorString(error)))
++                              (self.name, io.error_string(error)))
+ 
+         # read from the file
+         startline = self.options.get('start-line', None)
+@@ -625,7 +617,7 @@ def run(self):
+                 rawtext = include_file.read()
+         except UnicodeError as error:
+             raise self.severe('Problem with "%s" directive:\n%s' %
+-                              (self.name, ErrorString(error)))
++                              (self.name, io.error_string(error)))
+ 
+         config = self.state.document.settings.env.config
+         converter = M2R(
+@@ -670,7 +662,7 @@ def convert(text, **kwargs):
+ def parse_from_file(file, encoding='utf-8', **kwargs):
+     if not os.path.exists(file):
+         raise OSError('No such file exists: {}'.format(file))
+-    with _open(file, encoding=encoding) as f:
++    with open(file, encoding=encoding) as f:
+         src = f.read()
+     output = convert(src, **kwargs)
+     return output
+@@ -684,7 +676,7 @@ def save_to_file(file, src, encoding='utf-8', **kwargs):
+         if confirm.upper() not in ('Y', 'YES'):
+             print('skip {}'.format(file))
+             return
+-    with _open(target, 'w', encoding=encoding) as f:
++    with open(target, 'w', encoding=encoding) as f:
+         f.write(src)
+ 
+ 
+diff --git a/setup.py b/setup.py
+index a5768ad..bbc01b0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,7 +1,6 @@
+ #!/usr/bin/env python
+ # -*- coding: utf-8 -*-
+ 
+-import sys
+ from os import path
+ 
+ try:
+@@ -19,8 +18,6 @@
+ 
+ install_requires = ['mistune', 'docutils']
+ test_requirements = ['pygments']
+-if sys.version_info < (3, 3):
+-    test_requirements.append('mock')
+ 
+ setup(
+     name='m2r',
+@@ -42,12 +39,8 @@
+         'Intended Audience :: Developers',
+         'License :: OSI Approved :: MIT License',
+         'Natural Language :: English',
+-        'Programming Language :: Python :: 2',
+-        'Programming Language :: Python :: 2.7',
+         'Programming Language :: Python :: 3',
+-        'Programming Language :: Python :: 3.4',
+-        'Programming Language :: Python :: 3.5',
+-        'Programming Language :: Python :: 3.6',
++        'Programming Language :: Python :: 3.7',
+         'Topic :: Text Processing',
+     ],
+     install_requires=install_requires,

Deleted: python310.patch
===================================================================
--- python310.patch	2022-07-31 18:56:05 UTC (rev 1259466)
+++ python310.patch	2022-07-31 18:56:17 UTC (rev 1259467)
@@ -1,13 +0,0 @@
-diff -upr m2r-0.2.1.orig/tests/test_cli.py m2r-0.2.1/tests/test_cli.py
---- m2r-0.2.1.orig/tests/test_cli.py	2018-10-12 02:36:50.000000000 +0300
-+++ m2r-0.2.1/tests/test_cli.py	2021-12-02 14:27:24.916039487 +0200
-@@ -58,7 +58,8 @@ class TestConvert(TestCase):
-         self.assertIn('underscore-emphasis', message)
-         self.assertIn('anonymous-references', message)
-         self.assertIn('inline-math', message)
--        self.assertIn('optional arguments:', message)
-+        self.assertTrue(
-+            'optional arguments:' in message or 'options:' in message)
- 
-     def test_parse_file(self):
-         output = parse_from_file(test_md)

Copied: m2r/repos/community-any/python310.patch (from rev 1259466, m2r/trunk/python310.patch)
===================================================================
--- python310.patch	                        (rev 0)
+++ python310.patch	2022-07-31 18:56:17 UTC (rev 1259467)
@@ -0,0 +1,13 @@
+diff -upr m2r-0.2.1.orig/tests/test_cli.py m2r-0.2.1/tests/test_cli.py
+--- m2r-0.2.1.orig/tests/test_cli.py	2018-10-12 02:36:50.000000000 +0300
++++ m2r-0.2.1/tests/test_cli.py	2021-12-02 14:27:24.916039487 +0200
+@@ -58,7 +58,8 @@ class TestConvert(TestCase):
+         self.assertIn('underscore-emphasis', message)
+         self.assertIn('anonymous-references', message)
+         self.assertIn('inline-math', message)
+-        self.assertIn('optional arguments:', message)
++        self.assertTrue(
++            'optional arguments:' in message or 'options:' in message)
+ 
+     def test_parse_file(self):
+         output = parse_from_file(test_md)



More information about the arch-commits mailing list