15
0
Files
python-markdown2/python-markdown2.spec
Tomáš Chvátal 5d50dda3f3 Accepting request 614567 from home:czerw:branches:devel:languages:python:misc
Package was recently moved to d:l:p:misc and I would like to move it
back to d:l:p and to Factory.

- Update to version 2.3.5
  * [pull #238] Fenced code blocks lang with leading space
  * [pull #260] Search for items only within metadata header
  * [pull #264] highlightjs language class support
  * [pull #265] FIPS compliance
  * [pull #274] Fix for double amp replacement inside link title
- Update description from upstream
- Add pygments to BuildRequires
- Replace devel BuildRequires by base
- Apply spec-cleaner
- Add patch disable-failing-tests.patch to disable failing tests,
  upstream has no fix yet https://github.com/trentm/python-markdown2/issues/281

OBS-URL: https://build.opensuse.org/request/show/614567
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-markdown2?expand=0&rev=1
2018-06-06 13:49:25 +00:00

82 lines
2.5 KiB
RPMSpec

#
# spec file for package python-markdown2
#
# Copyright (c) 2018 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
# 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-%{**}}
%bcond_without test
Name: python-markdown2
Version: 2.3.5
Release: 0
Summary: A fast and complete Python implementation of Markdown
License: MIT
Group: Development/Languages/Python
URL: https://pypi.python.org/pypi/markdown2
Source: https://files.pythonhosted.org/packages/source/m/markdown2/markdown2-%{version}.zip
# PATCH-FIX-UPSTREAM disable-failing-tests.patch https://github.com/trentm/python-markdown2/issues/281
Patch0: disable-failing-tests.patch
BuildRequires: %{python_module base}
BuildRequires: %{python_module pygments}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Markdown2 is a fast and complete Python implementation of Markdown.
It was written to closely match the behaviour of the original
Perl-implemented Markdown.pl. Markdown2 also comes with a number of
extensions (called "extras") for things like syntax coloring, tables,
header-ids.
%prep
%setup -q -n markdown2-%{version}
%patch0 -p1
sed -i -e '/^#!\//, 1d' lib/markdown2.py
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/markdown2
%python_expand %fdupes %{buildroot}%{$python_bin_suffix}
%check
pushd test
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
%python_exec test.py -- -knownfailure
}
popd
%post
%python_install_alternative markdown2
%postun
%python_uninstall_alternative markdown2
%files %{python_files}
%license LICENSE.txt
%doc CHANGES.md CONTRIBUTORS.txt TODO.txt
%python_alternative %{_bindir}/markdown2
%{python_sitelib}/*
%changelog