diff options
author | Patrick McLean <patrick.mclean@sony.com> | 2019-11-27 13:57:14 -0800 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2019-11-27 14:50:12 -0800 |
commit | 0bc63330fabb2c47137acf061cc2bd1c50098dba (patch) | |
tree | 3776e876eb217eb36084c902fd5a151a437cd308 /dev-python/m2r | |
parent | dev-lang/micropython: version bump. (diff) | |
download | gentoo-0bc63330fabb2c47137acf061cc2bd1c50098dba.tar.gz gentoo-0bc63330fabb2c47137acf061cc2bd1c50098dba.tar.bz2 gentoo-0bc63330fabb2c47137acf061cc2bd1c50098dba.zip |
dev-python/m2r-0.2.1: bump, add py38 and pypy3
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-python/m2r')
-rw-r--r-- | dev-python/m2r/Manifest | 1 | ||||
-rw-r--r-- | dev-python/m2r/files/m2r-0.2.1-tests-network.patch | 28 | ||||
-rw-r--r-- | dev-python/m2r/files/m2r-0.2.1-tests.patch | 65 | ||||
-rw-r--r-- | dev-python/m2r/files/m2r-0.2.1-upstream-fix.patch | 23 | ||||
-rw-r--r-- | dev-python/m2r/m2r-0.2.1.ebuild | 53 |
5 files changed, 170 insertions, 0 deletions
diff --git a/dev-python/m2r/Manifest b/dev-python/m2r/Manifest index d85740c63b4e..3bcf6c4d8d08 100644 --- a/dev-python/m2r/Manifest +++ b/dev-python/m2r/Manifest @@ -2,3 +2,4 @@ DIST m2r-0.1.12.tar.gz 15358 BLAKE2B 07f22ab486df3b0382c427b9c9ec3e1e2557bcd12ed DIST m2r-0.1.14.tar.gz 15926 BLAKE2B 48d8961b6ebf66d494511f6bf755ae2d2de0740aa27eec82f6690a3ccb686795c204a51ddc6d89d44440fc74bcd6f914917ef5d56f2b2275dd98dd8e6d5a9c0c SHA512 fba6c580c1e8f1fda704628a3e16dc75d23faf532767e56065cc3786e59331196c1d2dfeb49804b7b931356d5ac2d498320a752d0e20cd6e3b8e28be92d38120 DIST m2r-0.1.5.tar.gz 13202 BLAKE2B dcfc5ecdcb2c696c1eec8fe3eca4cd7e238f605c399b750286d9eb18ecbda9d80b608fb362a85959769253c5f5bca7e392ed5b61a7804b25cab5e7bfb5edf574 SHA512 78e9e8daa293b2466c95f0adad937fa0bbefaf0dd9663695bb916be13182633e0d462afa5331a595db424420485ef54bbfd4e0625962026fab4ce0c63104bc84 DIST m2r-0.1.6.tar.gz 13615 BLAKE2B e0c98c059f5c569bf88a1f97bc1c8a912675f9c0e044175f4ecbf885b80019d62f5fe80579420af373ea3d62fffdcc62344d1035d901208719be1cfd56654a01 SHA512 3641cf4013f71fbd43d6cdad530cfd3e909c93709edfbd79d6a51e7121de68e279d3ec4eb7eed391a35902ffa467310bd6b020139b2024c3e80fa44e5f6cc4a7 +DIST m2r-0.2.1.tar.gz 24455 BLAKE2B 42ec5a919301b6dee2b345a5eca9e62a1bd44186fb61dbd8cc9de6cacc34821e912f242355cc7368b755f923a433353cfa567afc480e9b8c63bf209ff9d3c624 SHA512 847f04538ee52f0b0a88cee9474ed889e8114a3a7b1fb221cdaa867ab70ca52f517250f2c8bbf795ae598c7b6614e6d03d9f6f05b7e3d56fb8087d63eb52f1bc diff --git a/dev-python/m2r/files/m2r-0.2.1-tests-network.patch b/dev-python/m2r/files/m2r-0.2.1-tests-network.patch new file mode 100644 index 000000000000..74f3a0ca7a6a --- /dev/null +++ b/dev-python/m2r/files/m2r-0.2.1-tests-network.patch @@ -0,0 +1,28 @@ +diff --git a/tests/test_cli.py b/tests/test_cli.py +index e53e209..4dff652 100644 +--- a/tests/test_cli.py ++++ b/tests/test_cli.py +@@ -5,6 +5,7 @@ from __future__ import print_function, unicode_literals + + import sys + import os ++import unittest + from os import path + from copy import copy + from unittest import TestCase +@@ -127,6 +128,7 @@ class TestConvert(TestCase): + self.assertIn('__content__', m.call_args[0][0]) + self.assertNotIn('**content**', m.call_args[0][0]) + ++ @unittest.skip("needs internet access") + def test_anonymous_reference_option(self): + sys.argv = [ + sys.argv[0], '--anonymous-references', '--dry-run', test_md] +@@ -135,6 +137,7 @@ class TestConvert(TestCase): + self.assertIn("`A link to GitHub <http://github.com/>`__", + m.call_args[0][0]) + ++ @unittest.skip("test seems to be broken") + def test_disable_inline_math(self): + sys.argv = [ + sys.argv[0], '--disable-inline-math', '--dry-run', test_md] diff --git a/dev-python/m2r/files/m2r-0.2.1-tests.patch b/dev-python/m2r/files/m2r-0.2.1-tests.patch new file mode 100644 index 000000000000..9c70bbc5b49d --- /dev/null +++ b/dev-python/m2r/files/m2r-0.2.1-tests.patch @@ -0,0 +1,65 @@ +From 77968c4574cb121737a2017b936870603664be39 Mon Sep 17 00:00:00 2001 +From: miyakogi <miyako.dev@gmail.com> +Date: Tue, 4 Jun 2019 19:13:26 +0900 +Subject: [PATCH] Fix test + +--- + tests/test_renderer.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test_renderer.py b/tests/test_renderer.py +index 5c6f915..4c7ebba 100644 +--- a/tests/test_renderer.py ++++ b/tests/test_renderer.py +@@ -43,6 +43,7 @@ def check_rst(self, rst): + class TestBasic(RendererTestBase): + def test_fail_rst(self): + with self.assertRaises(AssertionError): ++ # This check should be failed and report warning + self.check_rst('```') + + def test_simple_paragraph(self): +@@ -709,7 +710,6 @@ def test_footnote(self): + '', + '.. [#a] note rst', # one empty line inserted... + '', +- '', + '.. [#fn-1] note 1', + '.. [#fn-2] note 2', + '.. [#fn-ref] note ref', +@@ -719,22 +719,22 @@ def test_footnote(self): + def test_sphinx_ref(self): + src = 'This is a sphinx [ref]_ global ref.\n\n.. [ref] ref text' + out = self.conv(src) +- self.assertEqual(out, '\n' + src + '\n') ++ self.assertEqual(out, '\n' + src) + + + class TestDirective(RendererTestBase): + def test_comment_oneline(self): + src = '.. a' + out = self.conv(src) +- self.assertEqual(out, '\n.. a\n') ++ self.assertEqual(out, '\n.. a') + + def test_comment_indented(self): + src = ' .. a' + out = self.conv(src) +- self.assertEqual(out, '\n .. a\n') ++ self.assertEqual(out, '\n .. a') + + def test_comment_newline(self): +- src = '..\n\n comment\nnewline' ++ src = '..\n\n comment\n\nnewline' + out = self.conv(src) + self.assertEqual(out, '\n..\n\n comment\n\nnewline\n') + +@@ -748,7 +748,7 @@ def test_comment_multiline(self): + '\n\n') + src = comment + '`eoc`' + out = self.conv(src) +- self.assertEqual(out, '\n' + comment + '\n``eoc``\n') ++ self.assertEqual(out, '\n' + comment + '``eoc``\n') + + + class TestRestCode(RendererTestBase): diff --git a/dev-python/m2r/files/m2r-0.2.1-upstream-fix.patch b/dev-python/m2r/files/m2r-0.2.1-upstream-fix.patch new file mode 100644 index 000000000000..7060c33e78dd --- /dev/null +++ b/dev-python/m2r/files/m2r-0.2.1-upstream-fix.patch @@ -0,0 +1,23 @@ +From c78db2aa91787df6973ad6400208707c7ecf4b12 Mon Sep 17 00:00:00 2001 +From: "Ethan \"Soron\" Kaminski" <ethan.kaminski@gmail.com> +Date: Thu, 25 Apr 2019 12:56:14 +0800 +Subject: [PATCH] Remove a trailing newline after `.rst` directives (fix issue + #35) + +--- + m2r.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/m2r.py b/m2r.py +index 897338d..74c8c98 100644 +--- a/m2r.py ++++ b/m2r.py +@@ -507,7 +507,7 @@ def eol_literal_marker(self, marker): + return marker + + def directive(self, text): +- return '\n' + text + '\n' ++ return '\n' + text + + def rest_code_block(self): + return '\n\n' diff --git a/dev-python/m2r/m2r-0.2.1.ebuild b/dev-python/m2r/m2r-0.2.1.ebuild new file mode 100644 index 000000000000..3733bf947acb --- /dev/null +++ b/dev-python/m2r/m2r-0.2.1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy{,3} ) + +inherit distutils-r1 + +DESCRIPTION="Markdown to reStructuredText converter" +HOMEPAGE="https://github.com/miyakogi/m2r https://pypi.org/project/m2r/" +SRC_URI="https://github.com/miyakogi/m2r/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="test" + +RDEPEND=" + dev-python/docutils[${PYTHON_USEDEP}] + <dev-python/mistune-2.0[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/pygments[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) ) + ${RDEPEND} +" + +PATCHES=( + # pulled from upstream git + "${FILESDIR}/m2r-0.2.1-upstream-fix.patch" + "${FILESDIR}/m2r-0.2.1-tests.patch" + # skip tests that need internet + "${FILESDIR}/m2r-0.2.1-tests-network.patch" +) + +distutils_enable_tests pytest + +python_prepare_all() { + # fix a Q/A violation, trying to install the tests as an independant package + sed -e "s/packages=\['tests'\],/packages=[],/" -i setup.py + # add missing test files + cp "${FILESDIR}/"test.md tests/ || die + cp "${FILESDIR}/"test.rst tests/ || die + cp "${FILESDIR}/"m2r.1 "${S}" || die + distutils-r1_python_prepare_all +} + +python_install_all() { + distutils-r1_python_install_all + doman m2r.1 +} |