3 %bcond_with doc # documentation
4 %bcond_without tests # unit tests
6 %define module markdown
7 Summary: Markdown implementation in Python 3
8 Summary(pl.UTF-8): Implementacja formatu Markdown w Pythonie 3
9 Name: python3-%{module}
13 Group: Development/Languages/Python
14 #Source0Download: https://pypi.org/simple/markdown/
15 Source0: https://files.pythonhosted.org/packages/source/M/Markdown/Markdown-%{version}.tar.gz
16 # Source0-md5: b6833c6326e9164ee0c662218a75e7f0
17 URL: https://pypi.org/project/markdown/
18 BuildRequires: python3-devel >= 1:3.6
19 BuildRequires: python3-setuptools >= 1:36.6
21 BuildRequires: python3-PyYAML
22 %if "%{py3_ver}" <= "3.8"
23 BuildRequires: python3-importlib_metadata
27 BuildRequires: python3-mkdocs >= 1.0
28 BuildRequires: python3-mkdocs-nature
30 BuildRequires: rpm-pythonprov
31 BuildRequires: rpmbuild(macros) >= 1.714
32 Conflicts: python-markdown < 3
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 This is a Python 3 implementation of John Gruber's Markdown. It is
38 almost completely compliant with the reference implementation, though
39 there are a few known issues.
41 %description -l pl.UTF-8
42 Ten pakiet zawiera implementację formatu Markdown Johna Grubera w
43 Pythonie 3. Jest prawie całkowicie zgodna z implementacją wzorcową,
44 choć jest kilka znanych problemów.
47 %setup -q -n Markdown-%{version}
53 %{__python3} -m unittest discover tests
61 rm -rf $RPM_BUILD_ROOT
65 %{__mv} $RPM_BUILD_ROOT%{_bindir}/markdown_py{,-%{py3_ver}}
67 ln -s markdown_py-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/markdown_py
70 rm -rf $RPM_BUILD_ROOT
73 %defattr(644,root,root,755)
74 %doc LICENSE.md README.md docs/{change_log,extensions,authors.md,cli.md,favicon.ico,index.md,py.png,reference.md}
75 %attr(755,root,root) %{_bindir}/markdown_py
76 %attr(755,root,root) %{_bindir}/markdown_py-%{py3_ver}
77 %{py3_sitescriptdir}/markdown
78 %{py3_sitescriptdir}/Markdown-%{version}-py*.egg-info