From e5265e8cab995ced927d8b8fa37abc3d26827d394e5a8ab8450535490a851ecd Mon Sep 17 00:00:00 2001 From: Todd R Date: Fri, 21 Apr 2017 14:18:34 +0000 Subject: [PATCH] Accepting request 489841 from home:TheBlackCat:branches:devel:languages:python - Split "cmark" executable into own package to avoid conflicts with the cmark C reference implementation. OBS-URL: https://build.opensuse.org/request/show/489841 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CommonMark?expand=0&rev=2 --- python-CommonMark.changes | 6 ++++++ python-CommonMark.spec | 39 +++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/python-CommonMark.changes b/python-CommonMark.changes index 8bb11e9..531aa7c 100644 --- a/python-CommonMark.changes +++ b/python-CommonMark.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 21 14:11:41 UTC 2017 - toddrme2178@gmail.com + +- Split "cmark" executable into own package to avoid conflicts with + the cmark C reference implementation. + ------------------------------------------------------------------- Mon Apr 3 14:56:45 UTC 2017 - toddrme2178@gmail.com diff --git a/python-CommonMark.spec b/python-CommonMark.spec index a1c322d..ca1a666 100644 --- a/python-CommonMark.spec +++ b/python-CommonMark.spec @@ -35,8 +35,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Provides: python-commonmark = %{version} Obsoletes: python-commonmark < %{version} -Requires(post): update-alternatives -Requires(preun): update-alternatives %python_subpackages @@ -54,13 +52,31 @@ so far seems to work (all tests pass on 2.7, 3.3, and 3.4). %package -n %{name}-doc Summary: Documentation for CommonMark -Provides: python2-CommonMark-doc = %{version} -Provides: python3-CommonMark-doc = %{version} +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 +Requires: pyython3-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. Once both this project and +the CommonMark specification are stable we will release the first 1.0 version +and attempt to keep up to date with changes in stmd.js. + +We are currently at the same development stage (actually a bit ahead because we +have implemented HTML entity conversion and href URL escaping) as stmd.js. Since +Python versions pre-3.4 use outdated (i.e. not HTML5 spec) entity conversion, +I’ve converted the 3.4 implementation into a single file, entitytrans.py which +so far seems to work (all tests pass on 2.7, 3.3, and 3.4). + +This package provides the "cmark" executable, to avoid conflicts with other +implementations. %prep %setup -q -n CommonMark-%{version} @@ -78,8 +94,6 @@ find CommonMark -name "*.py" | xargs sed -i '1 {/^#!/ d}' %python_expand %fdupes %{buildroot}%{$python_sitelib} -%python_clone -a %{buildroot}%{_bindir}/cmark - # Test broken due to encoding issue # %check @@ -88,17 +102,9 @@ find CommonMark -name "*.py" | xargs sed -i '1 {/^#!/ d}' # python setup.py test -%post -%python_install_alternative cmark - -%preun -%python_uninstall_alternative cmark - - %files %{python_files} %defattr(-,root,root,-) %doc README.rst LICENSE -%python_alternative %{_bindir}/cmark %{python_sitelib}/CommonMark/ %{python_sitelib}/CommonMark-%{version}-py*.egg-info @@ -106,4 +112,9 @@ find CommonMark -name "*.py" | xargs sed -i '1 {/^#!/ d}' %defattr(-,root,root,-) %doc spec.txt LICENSE +%files -n cmark-python +%defattr(-,root,root,-) +%doc spec.txt LICENSE +%{_bindir}/cmark + %changelog