forked from pool/python-CommonMark
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user