2017-04-06 17:20:34 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-CommonMark
|
|
|
|
|
#
|
2018-04-08 06:44:45 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-04-06 17:20:34 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2017-05-06 04:25:25 +00:00
|
|
|
%define oldpython python
|
2017-04-06 17:20:34 +00:00
|
|
|
Name: python-CommonMark
|
2018-04-08 06:44:45 +00:00
|
|
|
Version: 0.7.5
|
2017-04-06 17:20:34 +00:00
|
|
|
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 devel}
|
2017-06-09 20:22:32 +00:00
|
|
|
BuildRequires: %{python_module future}
|
2017-04-06 17:20:34 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-06-09 20:22:32 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2017-04-06 17:20:34 +00:00
|
|
|
Requires: python-future
|
|
|
|
|
BuildArch: noarch
|
2017-05-06 04:25:25 +00:00
|
|
|
%ifpython2
|
|
|
|
|
Obsoletes: %{oldpython}-commonmark < %{version}
|
|
|
|
|
Provides: %{oldpython}-commonmark = %{version}
|
|
|
|
|
%endif
|
|
|
|
|
%ifpython3
|
|
|
|
|
Provides: python3-commonmark = %{version}
|
|
|
|
|
Obsoletes: python3-commonmark < %{version}
|
|
|
|
|
%endif
|
2017-04-06 17:20:34 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
2017-06-09 20:22:32 +00:00
|
|
|
Pure Python port of jgm's stmd.js, a Markdown parser and renderer for the
|
|
|
|
|
CommonMark specification, using only native modules.
|
2017-04-06 17:20:34 +00:00
|
|
|
|
|
|
|
|
%package -n %{name}-doc
|
|
|
|
|
Summary: Documentation for CommonMark
|
2017-06-09 20:22:32 +00:00
|
|
|
Group: Documentation/HTML
|
2017-04-21 14:18:34 +00:00
|
|
|
Provides: %{python_module CommonMark-doc = %{version}}
|
2017-04-06 17:20:34 +00:00
|
|
|
|
|
|
|
|
%description -n %{name}-doc
|
2017-06-09 20:22:32 +00:00
|
|
|
Documentation for Pure Python port of jgm's stmd.js, a Markdown parser and
|
2017-04-06 17:20:34 +00:00
|
|
|
renderer for the CommonMark specification, using only native modules.
|
|
|
|
|
|
2017-04-21 14:18:34 +00:00
|
|
|
%package -n cmark-python
|
|
|
|
|
Summary: CommonMark parsing and rendering program in python
|
2017-06-09 20:22:32 +00:00
|
|
|
Group: Development/Languages/Python
|
2017-06-23 17:11:53 +00:00
|
|
|
Requires: python3-CommonMark = %{version}
|
2017-04-21 14:18:34 +00:00
|
|
|
Conflicts: cmark
|
|
|
|
|
|
|
|
|
|
%description -n cmark-python
|
2017-06-09 20:22:32 +00:00
|
|
|
Pure Python port of jgm's stmd.js, a Markdown parser and renderer for the
|
|
|
|
|
CommonMark specification, using only native modules.
|
2017-04-21 14:18:34 +00:00
|
|
|
|
|
|
|
|
This package provides the "cmark" executable, to avoid conflicts with other
|
|
|
|
|
implementations.
|
2017-04-06 17:20:34 +00:00
|
|
|
|
|
|
|
|
%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}'
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-04-08 06:44:45 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.rst
|
2017-04-06 17:20:34 +00:00
|
|
|
%{python_sitelib}/CommonMark/
|
|
|
|
|
%{python_sitelib}/CommonMark-%{version}-py*.egg-info
|
|
|
|
|
|
|
|
|
|
%files -n %{name}-doc
|
2018-04-08 06:44:45 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc spec.txt
|
2017-04-06 17:20:34 +00:00
|
|
|
|
2017-04-21 14:18:34 +00:00
|
|
|
%files -n cmark-python
|
2018-04-08 06:44:45 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc spec.txt
|
2017-04-21 14:18:34 +00:00
|
|
|
%{_bindir}/cmark
|
|
|
|
|
|
2017-04-06 17:20:34 +00:00
|
|
|
%changelog
|