From 45008601a2c9e68506f6dc6ef28c5bf9da1576b38d9402bc69b30f4aba662203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 5 Mar 2019 14:52:24 +0000 Subject: [PATCH] - Update to 0.8.1: * Added the Node.normalize() method. (from @lez) * Renamed package name to commonmark for PEP8 compliance. You can now do import commonmark as well as import CommonMark. Closes #60 * Added testing on Python 3.7. * Removed CommonMark symlink. So, as of this version, you need to replace all instances of CommonMark with commonmark in your code. - Remove the not-needed subpackages - Run the tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CommonMark?expand=0&rev=15 --- CommonMark-0.7.5.tar.gz | 3 -- commonmark-0.8.1.tar.gz | 3 ++ python-CommonMark.changes | 11 ++++++ python-CommonMark.spec | 73 +++++++++++---------------------------- 4 files changed, 34 insertions(+), 56 deletions(-) delete mode 100644 CommonMark-0.7.5.tar.gz create mode 100644 commonmark-0.8.1.tar.gz diff --git a/CommonMark-0.7.5.tar.gz b/CommonMark-0.7.5.tar.gz deleted file mode 100644 index 3427a07..0000000 --- a/CommonMark-0.7.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4dfbbd1dbc669a9b71a015032b2bbe5c4b019ca8b6ca410d89cf7020de46d2c0 -size 88702 diff --git a/commonmark-0.8.1.tar.gz b/commonmark-0.8.1.tar.gz new file mode 100644 index 0000000..12de437 --- /dev/null +++ b/commonmark-0.8.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abcbc854e0eae5deaf52ae5e328501b78b4a0758bf98ac8bb792fce993006084 +size 90795 diff --git a/python-CommonMark.changes b/python-CommonMark.changes index 18bac33..c15ef77 100644 --- a/python-CommonMark.changes +++ b/python-CommonMark.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Mar 5 14:36:25 UTC 2019 - Tomáš Chvátal + +- Update to 0.8.1: + * Added the Node.normalize() method. (from @lez) + * Renamed package name to commonmark for PEP8 compliance. You can now do import commonmark as well as import CommonMark. Closes #60 + * Added testing on Python 3.7. + * Removed CommonMark symlink. So, as of this version, you need to replace all instances of CommonMark with commonmark in your code. +- Remove the not-needed subpackages +- Run the tests + ------------------------------------------------------------------- Tue Dec 4 12:46:47 UTC 2018 - Matej Cepl diff --git a/python-CommonMark.spec b/python-CommonMark.spec index 0b89fba..545f945 100644 --- a/python-CommonMark.spec +++ b/python-CommonMark.spec @@ -1,7 +1,7 @@ # # spec file for package python-CommonMark # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,26 +19,30 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-CommonMark -Version: 0.7.5 +Version: 0.8.1 Release: 0 Summary: Python parser for the CommonMark Markdown spec License: BSD-3-Clause Group: Development/Languages/Python -Url: https://pypi.python.org/pypi/CommonMark -Source: https://files.pythonhosted.org/packages/source/C/CommonMark/CommonMark-%{version}.tar.gz -BuildRequires: %{python_module future} +URL: https://github.com/rtfd/CommonMark-py +Source: https://files.pythonhosted.org/packages/source/c/commonmark/commonmark-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes +BuildRequires: python-future BuildRequires: python-rpm-macros -Requires: python-future +Requires: python-setuptools +Provides: python-commonmark = %{version} +Obsoletes: python-commonmark < %{version} BuildArch: noarch %ifpython2 +Requires: python-future Obsoletes: %{oldpython}-commonmark < %{version} Provides: %{oldpython}-commonmark = %{version} %endif %ifpython3 -Provides: python3-commonmark = %{version} -Obsoletes: python3-commonmark < %{version} +Conflicts: cmark +Provides: cmark-python +Obsoletes: cmark-python %endif %python_subpackages @@ -46,63 +50,26 @@ Obsoletes: python3-commonmark < %{version} Pure Python port of jgm's stmd.js, a Markdown parser and renderer for the CommonMark specification, using only native modules. -%package -n %{name}-doc -Summary: Documentation for CommonMark -Group: Documentation/HTML -Provides: %{python_module CommonMark-doc = %{version}} - -%description -n %{name}-doc -Documentation for Pure Python port of jgm's stmd.js, a Markdown parser and -renderer for the CommonMark specification, using only native modules. - -%package -n cmark-python -Summary: CommonMark parsing and rendering program in python -Group: Development/Languages/Python -Requires: python3-CommonMark = %{version} -Conflicts: cmark - -%description -n cmark-python -Pure Python port of jgm's stmd.js, a Markdown parser and renderer for the -CommonMark specification, using only native modules. - -This package provides the "cmark" executable, to avoid conflicts with other -implementations. - %prep -%setup -q -n CommonMark-%{version} -chmod -x LICENSE -chmod -x README.rst -sed -i "s/\r//g" LICENSE -# find and remove unneeded shebangs -find CommonMark -name "*.py" | xargs sed -i '1 {/^#!/ d}' +%setup -q -n commonmark-%{version} %build %python_build %install %python_install - %python_expand %fdupes %{buildroot}%{$python_sitelib} -# Test broken due to encoding issue -# %check -# export LANG=en_US.UTF-8 -# export PYTHONPATH=%{buildroot}%{python_sitelib} -# python setup.py test +%check +export LANG=en_US.UTF-8 +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python commonmark/tests/unit_tests.py +# On python2 we error out on unicode issues +PYTHONPATH=%{buildroot}%{python3_sitelib} python3 setup.py test %files %{python_files} %license LICENSE %doc README.rst -%{python_sitelib}/CommonMark/ -%{python_sitelib}/CommonMark-%{version}-py*.egg-info - -%files -n %{name}-doc -%license LICENSE -%doc spec.txt - -%files -n cmark-python -%license LICENSE -%doc spec.txt -%{_bindir}/cmark +%{python_sitelib}/* +%python3_only %{_bindir}/cmark %changelog